@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | public function generate(): void |
42 | 42 | { |
43 | 43 | $projectDir = $this->container->getParameter('kernel.project_dir'); |
44 | - $srcDir = $projectDir.'/src'; |
|
44 | + $srcDir = $projectDir . '/src'; |
|
45 | 45 | |
46 | 46 | $finder = new Finder(); |
47 | 47 | $finder->files()->in($srcDir)->name('*.php'); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | if (preg_match('/class\s+(\w+)/', $contents, $matches)) { |
95 | - return $namespace ? $namespace.'\\'.$matches[1] : $matches[1]; |
|
95 | + return $namespace ? $namespace . '\\' . $matches[1] : $matches[1]; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | return null; |
@@ -166,17 +166,17 @@ discard block |
||
166 | 166 | |
167 | 167 | foreach ($method->getParameters() as $param) { |
168 | 168 | $paramType = $param->getType(); |
169 | - $type = $paramType ? $paramType->getName().' ' : ''; |
|
170 | - $defaultValue = $param->isOptional() ? ' = '.var_export($param->getDefaultValue(), true) : ''; |
|
171 | - $params[] = $type.'$'.$param->getName().$defaultValue; |
|
169 | + $type = $paramType ? $paramType->getName() . ' ' : ''; |
|
170 | + $defaultValue = $param->isOptional() ? ' = ' . var_export($param->getDefaultValue(), true) : ''; |
|
171 | + $params[] = $type . '$' . $param->getName() . $defaultValue; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | $paramsStringOriginal = implode(', ', $params); |
175 | 175 | |
176 | - $paramsVariable = $params ? '$'.implode( |
|
176 | + $paramsVariable = $params ? '$' . implode( |
|
177 | 177 | ', $', |
178 | 178 | array_map( |
179 | - static fn (ReflectionParameter $param): string => $param->getName(), |
|
179 | + static fn (ReflectionParameter $param) : string => $param->getName(), |
|
180 | 180 | $method->getParameters() |
181 | 181 | ) |
182 | 182 | ) : ''; |
@@ -185,14 +185,14 @@ discard block |
||
185 | 185 | $returnTypeString = $returnType ? $returnType->getName() : 'mixed'; |
186 | 186 | |
187 | 187 | if ($returnTypeString === 'self') { |
188 | - $returnTypeString = '\\'.$serviceInstanceReflection->getName(); |
|
188 | + $returnTypeString = '\\' . $serviceInstanceReflection->getName(); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | $params = []; |
192 | 192 | |
193 | 193 | foreach ($method->getParameters() as $param) { |
194 | 194 | $paramType = $param->getType(); |
195 | - $type = $paramType ? $paramType->getName().' ' : ''; |
|
195 | + $type = $paramType ? $paramType->getName() . ' ' : ''; |
|
196 | 196 | $params[] = "@param {$type}\${$param->getName()}"; |
197 | 197 | } |
198 | 198 |