@@ -66,23 +66,23 @@ |
||
66 | 66 | $user = trim(`id -u -n`); |
67 | 67 | $group = trim(`id -g -n`); |
68 | 68 | $questioner = $this->getHelper('question'); |
69 | - $replacements = []; |
|
69 | + $replacements = [ ]; |
|
70 | 70 | |
71 | 71 | $format = 'The RoadRunner path [<fg=yellow>%s</>]: '; |
72 | 72 | $question = new Question(sprintf($format, $rr), $rr); |
73 | - $replacements['{rr}'] = $questioner->ask($input, $output, $question); |
|
73 | + $replacements[ '{rr}' ] = $questioner->ask($input, $output, $question); |
|
74 | 74 | |
75 | 75 | $format = 'The directory in which the service will be started [<fg=yellow>%s</>]: '; |
76 | 76 | $question = new Question(sprintf($format, $cwd), $cwd); |
77 | - $replacements['{cwd}'] = $questioner->ask($input, $output, $question); |
|
77 | + $replacements[ '{cwd}' ] = $questioner->ask($input, $output, $question); |
|
78 | 78 | |
79 | 79 | $format = 'The user on whose behalf the service will be started [<fg=yellow>%s</>]: '; |
80 | 80 | $question = new Question(sprintf($format, $user), $user); |
81 | - $replacements['{user}'] = $questioner->ask($input, $output, $question); |
|
81 | + $replacements[ '{user}' ] = $questioner->ask($input, $output, $question); |
|
82 | 82 | |
83 | 83 | $format = 'The group on whose behalf the service will be started [<fg=yellow>%s</>]: '; |
84 | 84 | $question = new Question(sprintf($format, $group), $group); |
85 | - $replacements['{group}'] = $questioner->ask($input, $output, $question); |
|
85 | + $replacements[ '{group}' ] = $questioner->ask($input, $output, $question); |
|
86 | 86 | |
87 | 87 | $output->writeln(strtr(static::TEMPLATE, $replacements)); |
88 | 88 |
@@ -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 |
@@ -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 | - '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 | ]; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | 'cors.configuration.useCredentials' => false, |
37 | 37 | |
38 | 38 | 'cors.configuration.allOriginsAllowed' => false, |
39 | - 'cors.configuration.allowedOrigins' => [], |
|
39 | + 'cors.configuration.allowedOrigins' => [ ], |
|
40 | 40 | |
41 | 41 | 'cors.configuration.allMethodsAllowed' => false, |
42 | 42 | 'cors.configuration.allowedMethods' => [ |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | 'Authorization', |
57 | 57 | ], |
58 | 58 | |
59 | - 'cors.configuration.exposedHeaders' => [], |
|
59 | + 'cors.configuration.exposedHeaders' => [ ], |
|
60 | 60 | |
61 | 61 | 'cors.configuration.checkHost' => true, |
62 | 62 | ]; |
@@ -29,7 +29,7 @@ |
||
29 | 29 | 'url' => env('DATABASE_URL', 'mysql://user:[email protected]:3306/acme'), |
30 | 30 | ], |
31 | 31 | |
32 | - 'doctrine.configuration.default.metadata_sources' => [string('{app.root}/src/Entity')], |
|
32 | + 'doctrine.configuration.default.metadata_sources' => [ string('{app.root}/src/Entity') ], |
|
33 | 33 | 'doctrine.configuration.default.metadata_cache' => get('doctrine.configuration.default.default_cache'), |
34 | 34 | 'doctrine.configuration.default.query_cache' => get('doctrine.configuration.default.default_cache'), |
35 | 35 | 'doctrine.configuration.default.result_cache' => get('doctrine.configuration.default.default_cache'), |
@@ -97,11 +97,11 @@ |
||
97 | 97 | |
98 | 98 | foreach ($exception->getViolations() as $v) { |
99 | 99 | $violations->add(new ConstraintViolation( |
100 | - $v['message'], |
|
100 | + $v[ 'message' ], |
|
101 | 101 | null, |
102 | - [], |
|
102 | + [ ], |
|
103 | 103 | null, |
104 | - $v['property'], |
|
104 | + $v[ 'property' ], |
|
105 | 105 | null, |
106 | 106 | null, |
107 | 107 | self::BAD_REQUEST_ERROR_CODE, |
@@ -85,44 +85,37 @@ |
||
85 | 85 | $settings = new Settings(); |
86 | 86 | |
87 | 87 | $settings->init( |
88 | - $params['serverOriginScheme'], |
|
89 | - $params['serverOriginHost'], |
|
90 | - (int) $params['serverOriginPort'] |
|
88 | + $params[ 'serverOriginScheme' ], |
|
89 | + $params[ 'serverOriginHost' ], |
|
90 | + (int) $params[ 'serverOriginPort' ] |
|
91 | 91 | ); |
92 | 92 | |
93 | 93 | $settings->setPreFlightCacheMaxAge( |
94 | - (int) $params['preFlightCacheMaxAge'] |
|
94 | + (int) $params[ 'preFlightCacheMaxAge' ] |
|
95 | 95 | ); |
96 | 96 | |
97 | - $params['forceAddMethods'] ? |
|
98 | - $settings->enableAddAllowedMethodsToPreFlightResponse() : |
|
99 | - $settings->disableAddAllowedMethodsToPreFlightResponse(); |
|
97 | + $params[ 'forceAddMethods' ] ? |
|
98 | + $settings->enableAddAllowedMethodsToPreFlightResponse() : $settings->disableAddAllowedMethodsToPreFlightResponse(); |
|
100 | 99 | |
101 | - $params['forceAddHeaders'] ? |
|
102 | - $settings->enableAddAllowedHeadersToPreFlightResponse() : |
|
103 | - $settings->disableAddAllowedHeadersToPreFlightResponse(); |
|
100 | + $params[ 'forceAddHeaders' ] ? |
|
101 | + $settings->enableAddAllowedHeadersToPreFlightResponse() : $settings->disableAddAllowedHeadersToPreFlightResponse(); |
|
104 | 102 | |
105 | - $params['useCredentials'] ? |
|
106 | - $settings->setCredentialsSupported() : |
|
107 | - $settings->setCredentialsNotSupported(); |
|
103 | + $params[ 'useCredentials' ] ? |
|
104 | + $settings->setCredentialsSupported() : $settings->setCredentialsNotSupported(); |
|
108 | 105 | |
109 | - $params['allOriginsAllowed'] ? |
|
110 | - $settings->enableAllOriginsAllowed() : |
|
111 | - $settings->setAllowedOrigins($params['allowedOrigins']); |
|
106 | + $params[ 'allOriginsAllowed' ] ? |
|
107 | + $settings->enableAllOriginsAllowed() : $settings->setAllowedOrigins($params[ 'allowedOrigins' ]); |
|
112 | 108 | |
113 | - $params['allMethodsAllowed'] ? |
|
114 | - $settings->enableAllMethodsAllowed() : |
|
115 | - $settings->setAllowedMethods($params['allowedMethods']); |
|
109 | + $params[ 'allMethodsAllowed' ] ? |
|
110 | + $settings->enableAllMethodsAllowed() : $settings->setAllowedMethods($params[ 'allowedMethods' ]); |
|
116 | 111 | |
117 | - $params['allHeadersAllowed'] ? |
|
118 | - $settings->enableAllHeadersAllowed() : |
|
119 | - $settings->setAllowedHeaders($params['allowedHeaders']); |
|
112 | + $params[ 'allHeadersAllowed' ] ? |
|
113 | + $settings->enableAllHeadersAllowed() : $settings->setAllowedHeaders($params[ 'allowedHeaders' ]); |
|
120 | 114 | |
121 | - $settings->setExposedHeaders($params['exposedHeaders']); |
|
115 | + $settings->setExposedHeaders($params[ 'exposedHeaders' ]); |
|
122 | 116 | |
123 | - $params['checkHost'] ? |
|
124 | - $settings->enableCheckHost() : |
|
125 | - $settings->disableCheckHost(); |
|
117 | + $params[ 'checkHost' ] ? |
|
118 | + $settings->enableCheckHost() : $settings->disableCheckHost(); |
|
126 | 119 | |
127 | 120 | return $settings; |
128 | 121 | } |