@@ -3,7 +3,7 @@ |
||
3 | 3 | use Doctrine\Common\Annotations\AnnotationRegistry; |
4 | 4 | use Symfony\Component\Dotenv\Dotenv; |
5 | 5 | |
6 | -set_error_handler(function ($severity, $message, $file, $line) { |
|
6 | +set_error_handler(function($severity, $message, $file, $line) { |
|
7 | 7 | throw new ErrorException($message, 0, $severity, $file, $line); |
8 | 8 | }); |
9 | 9 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | // Allowed origins |
46 | 46 | 'cors.configuration.all_origins_allowed' => false, |
47 | - 'cors.configuration.allowed_origins' => [], |
|
47 | + 'cors.configuration.allowed_origins' => [ ], |
|
48 | 48 | |
49 | 49 | // Allowed methods |
50 | 50 | // |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | ], |
89 | 89 | |
90 | 90 | // Headers other than the simple ones that might be exposed to user agent. |
91 | - 'cors.configuration.exposed_headers' => [], |
|
91 | + 'cors.configuration.exposed_headers' => [ ], |
|
92 | 92 | |
93 | 93 | // If request 'Host' header should be checked against server's origin. |
94 | 94 | // Check of Host header is strongly encouraged by #6.3 CORS. |
@@ -7,7 +7,7 @@ |
||
7 | 7 | use function DI\factory; |
8 | 8 | |
9 | 9 | return [ |
10 | - 'router' => factory(function ($container) { |
|
10 | + 'router' => factory(function($container) { |
|
11 | 11 | $router = new Router(); |
12 | 12 | |
13 | 13 | $source = realpath(__DIR__ . '/../../src/Controller'); |
@@ -6,7 +6,7 @@ |
||
6 | 6 | use function DI\factory; |
7 | 7 | |
8 | 8 | return [ |
9 | - 'validator' => factory(function ($container) { |
|
9 | + 'validator' => factory(function($container) { |
|
10 | 10 | return Validation::createValidatorBuilder() |
11 | 11 | ->enableAnnotationMapping() |
12 | 12 | ->setConstraintValidatorFactory( |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | use function DI\string; |
13 | 13 | |
14 | 14 | return [ |
15 | - 'commands' => decorate(function ($previous, $container) { |
|
15 | + 'commands' => decorate(function($previous, $container) { |
|
16 | 16 | // the provider contains commands for |
17 | 17 | // the following Doctrine libraries: DBAL, ORM and Migrations. |
18 | 18 | $provider = new CommandsProvider($container); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | 'url' => env('DATABASE_URL', 'mysql://user:[email protected]:3306/acme'), |
56 | 56 | ], |
57 | 57 | |
58 | - 'doctrine.configuration.default.metadata_sources' => [string('{app.root}/src/Entity')], |
|
58 | + 'doctrine.configuration.default.metadata_sources' => [ string('{app.root}/src/Entity') ], |
|
59 | 59 | 'doctrine.configuration.default.metadata_cache' => get('doctrine.configuration.default.default_cache'), |
60 | 60 | 'doctrine.configuration.default.query_cache' => get('doctrine.configuration.default.default_cache'), |
61 | 61 | 'doctrine.configuration.default.result_cache' => get('doctrine.configuration.default.default_cache'), |
@@ -6,7 +6,7 @@ |
||
6 | 6 | use function DI\factory; |
7 | 7 | |
8 | 8 | return [ |
9 | - 'openapi' => factory(function ($container) { |
|
9 | + 'openapi' => factory(function($container) { |
|
10 | 10 | $info = new Info( |
11 | 11 | $container->get('app.name'), |
12 | 12 | $container->get('app.version') |
@@ -19,5 +19,5 @@ |
||
19 | 19 | create(ErrorLogHandler::class), |
20 | 20 | ], |
21 | 21 | |
22 | - 'monolog.configuration.processors' => [], |
|
22 | + 'monolog.configuration.processors' => [ ], |
|
23 | 23 | ]; |
@@ -84,11 +84,11 @@ |
||
84 | 84 | |
85 | 85 | foreach ($exception->getViolations() as $v) { |
86 | 86 | $violations->add(new ConstraintViolation( |
87 | - $v['message'], |
|
87 | + $v[ 'message' ], |
|
88 | 88 | null, |
89 | - [], |
|
89 | + [ ], |
|
90 | 90 | null, |
91 | - $v['property'], |
|
91 | + $v[ 'property' ], |
|
92 | 92 | null, |
93 | 93 | null, |
94 | 94 | 'b187c971-810b-455a-baf3-06dc6a1591f4', |
@@ -82,58 +82,51 @@ |
||
82 | 82 | $settings = new Settings(); |
83 | 83 | |
84 | 84 | // the object initialization... |
85 | - $settings->setAllowedOrigins([]); |
|
86 | - $settings->setAllowedMethods([]); |
|
87 | - $settings->setAllowedHeaders([]); |
|
88 | - $settings->setExposedHeaders([]); |
|
85 | + $settings->setAllowedOrigins([ ]); |
|
86 | + $settings->setAllowedMethods([ ]); |
|
87 | + $settings->setAllowedHeaders([ ]); |
|
88 | + $settings->setExposedHeaders([ ]); |
|
89 | 89 | |
90 | 90 | $settings->setServerOrigin( |
91 | - (string) $params['server_origin_scheme'], |
|
92 | - (string) $params['server_origin_host'], |
|
93 | - (int) $params['server_origin_port'] |
|
91 | + (string) $params[ 'server_origin_scheme' ], |
|
92 | + (string) $params[ 'server_origin_host' ], |
|
93 | + (int) $params[ 'server_origin_port' ] |
|
94 | 94 | ); |
95 | 95 | |
96 | 96 | $settings->setPreFlightCacheMaxAge( |
97 | - (int) $params['pre_flight_cache_max_age'] |
|
97 | + (int) $params[ 'pre_flight_cache_max_age' ] |
|
98 | 98 | ); |
99 | 99 | |
100 | - $params['force_add_methods'] ? |
|
101 | - $settings->enableAddAllowedMethodsToPreFlightResponse() : |
|
102 | - $settings->disableAddAllowedMethodsToPreFlightResponse(); |
|
100 | + $params[ 'force_add_methods' ] ? |
|
101 | + $settings->enableAddAllowedMethodsToPreFlightResponse() : $settings->disableAddAllowedMethodsToPreFlightResponse(); |
|
103 | 102 | |
104 | - $params['force_add_headers'] ? |
|
105 | - $settings->enableAddAllowedHeadersToPreFlightResponse() : |
|
106 | - $settings->disableAddAllowedHeadersToPreFlightResponse(); |
|
103 | + $params[ 'force_add_headers' ] ? |
|
104 | + $settings->enableAddAllowedHeadersToPreFlightResponse() : $settings->disableAddAllowedHeadersToPreFlightResponse(); |
|
107 | 105 | |
108 | - $params['use_credentials'] ? |
|
109 | - $settings->setCredentialsSupported() : |
|
110 | - $settings->setCredentialsNotSupported(); |
|
106 | + $params[ 'use_credentials' ] ? |
|
107 | + $settings->setCredentialsSupported() : $settings->setCredentialsNotSupported(); |
|
111 | 108 | |
112 | - $params['all_origins_allowed'] ? |
|
113 | - $settings->enableAllOriginsAllowed() : |
|
114 | - $settings->setAllowedOrigins( |
|
115 | - (array) $params['allowed_origins'] |
|
109 | + $params[ 'all_origins_allowed' ] ? |
|
110 | + $settings->enableAllOriginsAllowed() : $settings->setAllowedOrigins( |
|
111 | + (array) $params[ 'allowed_origins' ] |
|
116 | 112 | ); |
117 | 113 | |
118 | - $params['all_methods_allowed'] ? |
|
119 | - $settings->enableAllMethodsAllowed() : |
|
120 | - $settings->setAllowedMethods( |
|
121 | - (array) $params['allowed_methods'] |
|
114 | + $params[ 'all_methods_allowed' ] ? |
|
115 | + $settings->enableAllMethodsAllowed() : $settings->setAllowedMethods( |
|
116 | + (array) $params[ 'allowed_methods' ] |
|
122 | 117 | ); |
123 | 118 | |
124 | - $params['all_headers_allowed'] ? |
|
125 | - $settings->enableAllHeadersAllowed() : |
|
126 | - $settings->setAllowedHeaders( |
|
127 | - (array) $params['allowed_headers'] |
|
119 | + $params[ 'all_headers_allowed' ] ? |
|
120 | + $settings->enableAllHeadersAllowed() : $settings->setAllowedHeaders( |
|
121 | + (array) $params[ 'allowed_headers' ] |
|
128 | 122 | ); |
129 | 123 | |
130 | 124 | $settings->setExposedHeaders( |
131 | - (array) $params['exposed_headers'] |
|
125 | + (array) $params[ 'exposed_headers' ] |
|
132 | 126 | ); |
133 | 127 | |
134 | - $params['check_host'] ? |
|
135 | - $settings->enableCheckHost() : |
|
136 | - $settings->disableCheckHost(); |
|
128 | + $params[ 'check_host' ] ? |
|
129 | + $settings->enableCheckHost() : $settings->disableCheckHost(); |
|
137 | 130 | |
138 | 131 | return $settings; |
139 | 132 | } |