@@ -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; |
@@ -161,17 +161,17 @@ discard block |
||
161 | 161 | |
162 | 162 | foreach ($method->getParameters() as $param) { |
163 | 163 | $paramType = $param->getType(); |
164 | - $type = $paramType ? $paramType->getName().' ' : ''; |
|
165 | - $defaultValue = $param->isOptional() ? ' = '.var_export($param->getDefaultValue(), true) : ''; |
|
166 | - $params[] = $type.'$'.$param->getName().$defaultValue; |
|
164 | + $type = $paramType ? $paramType->getName() . ' ' : ''; |
|
165 | + $defaultValue = $param->isOptional() ? ' = ' . var_export($param->getDefaultValue(), true) : ''; |
|
166 | + $params[] = $type . '$' . $param->getName() . $defaultValue; |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | $paramsStringOriginal = implode(', ', $params); |
170 | 170 | |
171 | - $paramsVariable = $params ? '$'.implode( |
|
171 | + $paramsVariable = $params ? '$' . implode( |
|
172 | 172 | ', $', |
173 | 173 | array_map( |
174 | - static fn (ReflectionParameter $param): string => $param->getName(), |
|
174 | + static fn (ReflectionParameter $param) : string => $param->getName(), |
|
175 | 175 | $method->getParameters() |
176 | 176 | ) |
177 | 177 | ) : ''; |
@@ -180,14 +180,14 @@ discard block |
||
180 | 180 | $returnTypeString = $returnType ? $returnType->getName() : 'mixed'; |
181 | 181 | |
182 | 182 | if ($returnTypeString === 'self') { |
183 | - $returnTypeString = '\\'.$serviceInstanceReflection->getName(); |
|
183 | + $returnTypeString = '\\' . $serviceInstanceReflection->getName(); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | $params = []; |
187 | 187 | |
188 | 188 | foreach ($method->getParameters() as $param) { |
189 | 189 | $paramType = $param->getType(); |
190 | - $type = $paramType ? $paramType->getName().' ' : ''; |
|
190 | + $type = $paramType ? $paramType->getName() . ' ' : ''; |
|
191 | 191 | $params[] = "@param {$type}\${$param->getName()}"; |
192 | 192 | } |
193 | 193 |