diff --git a/phpcs.xml b/phpcs.xml index ebb10e7..1c4c04e 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -2,6 +2,13 @@ + + + + + + + config src diff --git a/src/SwaggerUiControllerFactory.php b/src/SwaggerUiControllerFactory.php index 90ebf61..7716dcd 100644 --- a/src/SwaggerUiControllerFactory.php +++ b/src/SwaggerUiControllerFactory.php @@ -37,7 +37,11 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o )); } - return new SwaggerUiController($container->has(ApiFactory::class) ? $container->get(ApiFactory::class) : $container->get(\ZF\Apigility\Documentation\ApiFactory::class)); + $apiFactory = $container->has(ApiFactory::class) + ? $container->get(ApiFactory::class) + : $container->get(\ZF\Apigility\Documentation\ApiFactory::class); + + return new SwaggerUiController($apiFactory); } /** diff --git a/test/TestAsset/fixtures/swagger2.json b/test/TestAsset/fixtures/swagger2.json index 52384b9..d8d4441 100644 --- a/test/TestAsset/fixtures/swagger2.json +++ b/test/TestAsset/fixtures/swagger2.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "Test", - "version": "1.0" + "version": 1 }, "tags": [{ "name": "BooBaz"