Add a missing variable initialisation

This commit is contained in:
Guilhem N 2018-01-26 07:37:03 +01:00 committed by GitHub
parent b4c3dcd6ae
commit 79482bf7a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,7 @@ trait RouteDescriberTrait
*/ */
private function getOperations(Swagger $api, Route $route): array private function getOperations(Swagger $api, Route $route): array
{ {
$operations = [];
$path = $api->getPaths()->get($this->normalizePath($route->getPath())); $path = $api->getPaths()->get($this->normalizePath($route->getPath()));
$methods = $route->getMethods() ?: Swagger::$METHODS; $methods = $route->getMethods() ?: Swagger::$METHODS;
foreach ($methods as $method) { foreach ($methods as $method) {