@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | // Decline static file requests back to the PHP built-in webserver |
13 | 13 | if (php_sapi_name() === 'cli-server') { |
14 | - $path = realpath(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)); |
|
14 | + $path = realpath(__DIR__ . parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH)); |
|
15 | 15 | if (__FILE__ !== $path && is_file($path)) { |
16 | 16 | return false; |
17 | 17 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | // Composer autoloading |
22 | 22 | include __DIR__ . '/../vendor/autoload.php'; |
23 | 23 | |
24 | -if (! class_exists(Application::class)) { |
|
24 | +if (!class_exists(Application::class)) { |
|
25 | 25 | throw new RuntimeException( |
26 | 26 | "Unable to load application.\n" |
27 | 27 | . "- Type `composer install` if you are developing locally.\n" |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $events->attach( |
28 | 28 | 'doctrine', |
29 | 29 | 'loadCli.post', |
30 | - function (EventInterface $e) { |
|
30 | + function(EventInterface $e) { |
|
31 | 31 | /* @var $cli Application */ |
32 | 32 | $cli = $e->getTarget(); |
33 | 33 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | ConsoleRunner::addCommands($cli); |
40 | 40 | |
41 | - $cli->addCommands([new GenerateTraitCommand($em)]); |
|
41 | + $cli->addCommands([ new GenerateTraitCommand($em) ]); |
|
42 | 42 | } |
43 | 43 | ); |
44 | 44 | } |
@@ -89,10 +89,10 @@ discard block |
||
89 | 89 | public function execute(InputInterface $input, OutputInterface $output) |
90 | 90 | { |
91 | 91 | /** @var string $traitName */ |
92 | - $traitName = (string)$input->getOption('classname'); |
|
92 | + $traitName = (string) $input->getOption('classname'); |
|
93 | 93 | |
94 | 94 | /** @var string $destination */ |
95 | - $destination = (string)$input->getOption('destination'); |
|
95 | + $destination = (string) $input->getOption('destination'); |
|
96 | 96 | |
97 | 97 | $outputFileName = sprintf( |
98 | 98 | '%s/%s.php', |
@@ -169,11 +169,11 @@ discard block |
||
169 | 169 | private function generateTrait(InputInterface $input): TraitGenerator |
170 | 170 | { |
171 | 171 | /** @var string $entityManagerGetter */ |
172 | - $entityManagerGetter = (string)$input->getOption('em-getter'); |
|
172 | + $entityManagerGetter = (string) $input->getOption('em-getter'); |
|
173 | 173 | /** @var string $traitName */ |
174 | - $traitName = (string)$input->getOption('classname'); |
|
174 | + $traitName = (string) $input->getOption('classname'); |
|
175 | 175 | /** @var string $traitNameSpace */ |
176 | - $traitNameSpace = (string)$input->getOption('namespace'); |
|
176 | + $traitNameSpace = (string) $input->getOption('namespace'); |
|
177 | 177 | |
178 | 178 | $trait = new TraitGenerator( |
179 | 179 | $traitName, |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | 'get%sRepository', |
231 | 231 | $reflection->getShortName() |
232 | 232 | ), |
233 | - [], |
|
233 | + [ ], |
|
234 | 234 | MethodGenerator::FLAG_PUBLIC, |
235 | 235 | sprintf( |
236 | 236 | 'return $this->%s->getRepository(\\%s::class);', |
@@ -1,2 +1,2 @@ |
||
1 | 1 | <?php |
2 | -return []; |
|
2 | +return [ ]; |