Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
<ruleset name="Laminas coding standard">
<rule ref="./vendor/laminas/laminas-coding-standard/ruleset.xml"/>

<!-- Bumping line limit, as URL for license is one character longer -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="121"/>
</properties>
</rule>

<!-- Paths to check -->
<file>config</file>
<file>src</file>
Expand Down
6 changes: 5 additions & 1 deletion src/SwaggerUiControllerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/TestAsset/fixtures/swagger2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Test",
"version": "1.0"
"version": 1
},
"tags": [{
"name": "BooBaz"
Expand Down