@@ -146,8 +146,8 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | private function registerLoader(string $appDir): void |
| 148 | 148 | { |
| 149 | - $loaderFile = $appDir . '/vendor/autoload.php'; |
|
| 150 | - if (! file_exists($loaderFile)) { |
|
| 149 | + $loaderFile = $appDir.'/vendor/autoload.php'; |
|
| 150 | + if (!file_exists($loaderFile)) { |
|
| 151 | 151 | throw new RuntimeException('no loader'); |
| 152 | 152 | } |
| 153 | 153 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | assert($loader instanceof ClassLoader); |
| 156 | 156 | spl_autoload_register( |
| 157 | 157 | /** @var class-string $class */ |
| 158 | - function (string $class) use ($loader): void { |
|
| 158 | + function(string $class) use ($loader): void { |
|
| 159 | 159 | $loader->loadClass($class); |
| 160 | 160 | if ($class !== NullPage::class) { |
| 161 | 161 | $this->classes[] = $class; |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | private function getFileInfo(string $filename): string |
| 189 | 189 | { |
| 190 | 190 | if (in_array($filename, $this->overwritten, true)) { |
| 191 | - return $filename . ' (overwritten)'; |
|
| 191 | + return $filename.' (overwritten)'; |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | return $filename; |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | %s |
| 215 | 215 | require __DIR__ . '/vendor/autoload.php'; |
| 216 | 216 | ", $this->context, $requiredFile); |
| 217 | - $fileName = realpath($appDir) . '/autoload.php'; |
|
| 217 | + $fileName = realpath($appDir).'/autoload.php'; |
|
| 218 | 218 | $this->putFileContents($fileName, $autoloadFile); |
| 219 | 219 | |
| 220 | 220 | return $fileName; |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | require __DIR__ . '/vendor/autoload.php'; |
| 240 | 240 | |
| 241 | 241 | %s", $this->context, $requiredOnceFile); |
| 242 | - $fileName = realpath($appMeta->appDir) . '/preload.php'; |
|
| 242 | + $fileName = realpath($appMeta->appDir).'/preload.php'; |
|
| 243 | 243 | $this->putFileContents($fileName, $preloadFile); |
| 244 | 244 | |
| 245 | 245 | return $fileName; |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | { |
| 250 | 250 | $dir = (string) realpath($rootDir); |
| 251 | 251 | if (strpos($file, $dir) !== false) { |
| 252 | - return (string) preg_replace('#^' . preg_quote($dir, '#') . '#', "__DIR__ . '", $file); |
|
| 252 | + return (string) preg_replace('#^'.preg_quote($dir, '#').'#', "__DIR__ . '", $file); |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | return $file; |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | |
| 287 | 287 | /** @var class-string $class */ |
| 288 | 288 | $filePath = (string) (new ReflectionClass($class))->getFileName(); // @phpstan-ignore-line |
| 289 | - if (! $this->isNotCompileFile($filePath)) { |
|
| 289 | + if (!$this->isNotCompileFile($filePath)) { |
|
| 290 | 290 | continue; // @codeCoverageIgnore |
| 291 | 291 | } |
| 292 | 292 | |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | |
| 304 | 304 | private function isNotAutoloadble(string $class): bool |
| 305 | 305 | { |
| 306 | - return ! class_exists($class, false) && ! interface_exists($class, false) && ! trait_exists($class, false); |
|
| 306 | + return !class_exists($class, false) && !interface_exists($class, false) && !trait_exists($class, false); |
|
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | private function loadResources(string $appName, string $context, string $appDir): void |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | |
| 319 | 319 | private function getInstance(string $interface, string $name = ''): void |
| 320 | 320 | { |
| 321 | - $dependencyIndex = $interface . '-' . $name; |
|
| 321 | + $dependencyIndex = $interface.'-'.$name; |
|
| 322 | 322 | if (in_array($dependencyIndex, $this->compiled, true)) { |
| 323 | 323 | // @codeCoverageIgnoreStart |
| 324 | 324 | printf("S %s:%s\n", $interface, $name); |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | |
| 365 | 365 | private function hookNullObjectClass(string $appDir): void |
| 366 | 366 | { |
| 367 | - $compileScript = realpath($appDir) . '/.compile.php'; |
|
| 367 | + $compileScript = realpath($appDir).'/.compile.php'; |
|
| 368 | 368 | if (file_exists($compileScript)) { |
| 369 | 369 | require $compileScript; |
| 370 | 370 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | $class = new ReflectionClass($className); |
| 32 | 32 | $instance = $class->newInstanceWithoutConstructor(); |
| 33 | - if (! $instance instanceof $className) { |
|
| 33 | + if (!$instance instanceof $className) { |
|
| 34 | 34 | return; // @codeCoverageIgnore |
| 35 | 35 | } |
| 36 | 36 | |
@@ -64,13 +64,13 @@ discard block |
||
| 64 | 64 | private function saveNamedParam(NamedParameterInterface $namedParameter, object $instance, string $method): void |
| 65 | 65 | { |
| 66 | 66 | // named parameter |
| 67 | - if (! in_array($method, ['onGet', 'onPost', 'onPut', 'onPatch', 'onDelete', 'onHead'], true)) { |
|
| 68 | - return; // @codeCoverageIgnore |
|
| 67 | + if (!in_array($method, ['onGet', 'onPost', 'onPut', 'onPatch', 'onDelete', 'onHead'], true)) { |
|
| 68 | + return; // @codeCoverageIgnore |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | $callable = [$instance, $method]; |
| 72 | - if (! is_callable($callable)) { |
|
| 73 | - return; // @codeCoverageIgnore |
|
| 72 | + if (!is_callable($callable)) { |
|
| 73 | + return; // @codeCoverageIgnore |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | try { |