Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Added config to phpcs rules, and fixed issues
  • Loading branch information
weierophinney committed Jul 14, 2016
commit bde2acef3fa2c92ea6a2fc4b5110e3644bb1c320
120 changes: 61 additions & 59 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,77 +4,79 @@
* @copyright Copyright (c) 2014 Zend Technologies USA Inc. (http://www.zend.com)
*/

return array(
'router' => array(
'routes' => array(
'zf-apigility' => array(
'child_routes' => array(
'swagger' => array(
'type' => 'Zend\Mvc\Router\Http\Segment',
'options' => array(
namespace ZF\Apigility\Documentation\Swagger;

return [
'router' => [
'routes' => [
'zf-apigility' => [
'child_routes' => [
'swagger' => [
'type' => 'segment',
'options' => [
'route' => '/swagger',
'defaults' => array(
'controller' => 'ZF\Apigility\Documentation\Swagger\SwaggerUi',
'defaults' => [
'controller' => SwaggerUi::class,
'action' => 'list',
),
),
],
],
'may_terminate' => true,
'child_routes' => array(
'api' => array(
'type' => 'Segment',
'options' => array(
'child_routes' => [
'api' => [
'type' => 'segment',
'options' => [
'route' => '/:api',
'defaults' => array(
'defaults' => [
'action' => 'show',
),
),
],
],
'may_terminate' => true,
),
),
),
),
),
),
),
],
],
],
],
],
],
],

'service_manager' => array(
'factories' => array(
'ZF\Apigility\Documentation\Swagger\SwaggerViewStrategy' => 'ZF\Apigility\Documentation\Swagger\SwaggerViewStrategyFactory',
),
),
'service_manager' => [
'factories' => [
SwaggerViewStrategy::class => SwaggerViewStrategyFactory::class,
],
],

'controllers' => array(
'factories' => array(
'ZF\Apigility\Documentation\Swagger\SwaggerUi' => 'ZF\Apigility\Documentation\Swagger\SwaggerUiControllerFactory',
),
),
'controllers' => [
'factories' => [
SwaggerUi::class => SwaggerUiControllerFactory::class,
],
],

'view_manager' => array(
'template_path_stack' => array(
'view_manager' => [
'template_path_stack' => [
'zf-apigility-documentation-swagger' => __DIR__ . '/../view',
),
),
],
],

'asset_manager' => array(
'resolver_configs' => array(
'paths' => array(
'asset_manager' => [
'resolver_configs' => [
'paths' => [
__DIR__ . '/../asset',
),
),
),
],
],
],

'zf-content-negotiation' => array(
'accept_whitelist' => array(
'ZF\Apigility\Documentation\Controller' => array(
'zf-content-negotiation' => [
'accept_whitelist' => [
'ZF\Apigility\Documentation\Controller' => [
0 => 'application/vnd.swagger+json',
),
),
'selectors' => array(
'Documentation' => array(
'ZF\Apigility\Documentation\Swagger\ViewModel' => array(
],
],
'selectors' => [
'Documentation' => [
ViewModel::class => [
'application/vnd.swagger+json',
),
)
)
),
);
],
],
],
],
];
1 change: 1 addition & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</rule>

<!-- Paths to check -->
<file>config</file>
<file>src</file>
<file>test</file>
</ruleset>