@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | public function __invoke(string $interface, string $name = ''): void |
| 36 | 36 | { |
| 37 | - $dependencyIndex = $interface . '-' . $name; |
|
| 37 | + $dependencyIndex = $interface.'-'.$name; |
|
| 38 | 38 | if (in_array($dependencyIndex, $this->compiled, true)) { |
| 39 | 39 | // @codeCoverageIgnoreStart |
| 40 | 40 | printf("S %s:%s\n", $interface, $name); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | public function getFileInfo(string $filename): string |
| 82 | 82 | { |
| 83 | 83 | if (in_array($filename, (array) $this->overwritten, true)) { |
| 84 | - return $filename . ' (overwritten)'; |
|
| 84 | + return $filename.' (overwritten)'; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | return $filename; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | /** @var class-string $class */ |
| 123 | 123 | $filePath = (string) (new ReflectionClass($class))->getFileName(); // @phpstan-ignore-line |
| 124 | - if (! $this->isNotCompileFile($filePath)) { |
|
| 124 | + if (!$this->isNotCompileFile($filePath)) { |
|
| 125 | 125 | continue; // @codeCoverageIgnore |
| 126 | 126 | } |
| 127 | 127 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | %s |
| 153 | 153 | require __DIR__ . '/vendor/autoload.php'; |
| 154 | 154 | ", $this->context, $requiredFile); |
| 155 | - $fileName = realpath($appDir) . '/autoload.php'; |
|
| 155 | + $fileName = realpath($appDir).'/autoload.php'; |
|
| 156 | 156 | ($this->filePutContents)($fileName, $autoloadFile); |
| 157 | 157 | |
| 158 | 158 | return $fileName; |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | private function isNotAutoloadble(string $class): bool |
| 177 | 177 | { |
| 178 | - return ! class_exists($class, false) && ! interface_exists($class, false) && ! trait_exists($class, false); |
|
| 178 | + return !class_exists($class, false) && !interface_exists($class, false) && !trait_exists($class, false); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | private function isNotCompileFile(string $filePath): bool |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | { |
| 188 | 188 | $dir = (string) realpath($rootDir); |
| 189 | 189 | if (strpos($file, $dir) !== false) { |
| 190 | - return (string) preg_replace('#^' . preg_quote($dir, '#') . '#', "__DIR__ . '", $file); |
|
| 190 | + return (string) preg_replace('#^'.preg_quote($dir, '#').'#', "__DIR__ . '", $file); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | return $file; |
@@ -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 { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | require __DIR__ . '/vendor/autoload.php'; |
| 65 | 65 | |
| 66 | 66 | %s", $this->context, $requiredOnceFile); |
| 67 | - $fileName = realpath($appMeta->appDir) . '/preload.php'; |
|
| 67 | + $fileName = realpath($appMeta->appDir).'/preload.php'; |
|
| 68 | 68 | ($this->filePutContents)($fileName, $preloadFile); |
| 69 | 69 | |
| 70 | 70 | return $fileName; |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | { |
| 85 | 85 | $dir = (string) realpath($rootDir); |
| 86 | 86 | if (strpos($path, $dir) !== false) { |
| 87 | - return (string) preg_replace('#^' . preg_quote($dir, '#') . '#', "__DIR__ . '", $path); |
|
| 87 | + return (string) preg_replace('#^'.preg_quote($dir, '#').'#', "__DIR__ . '", $path); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | return $path; |
@@ -128,8 +128,8 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | private function registerLoader(string $appDir): void |
| 130 | 130 | { |
| 131 | - $loaderFile = $appDir . '/vendor/autoload.php'; |
|
| 132 | - if (! file_exists($loaderFile)) { |
|
| 131 | + $loaderFile = $appDir.'/vendor/autoload.php'; |
|
| 132 | + if (!file_exists($loaderFile)) { |
|
| 133 | 133 | throw new RuntimeException('no loader'); |
| 134 | 134 | } |
| 135 | 135 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | assert($loader instanceof ClassLoader); |
| 138 | 138 | spl_autoload_register( |
| 139 | 139 | /** @var class-string $class */ |
| 140 | - function (string $class) use ($loader): void { |
|
| 140 | + function(string $class) use ($loader): void { |
|
| 141 | 141 | $loader->loadClass($class); |
| 142 | 142 | if ($class !== NullPage::class) { |
| 143 | 143 | /** @psalm-suppress NullArgument */ |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | private function hookNullObjectClass(string $appDir): void |
| 151 | 151 | { |
| 152 | - $compileScript = realpath($appDir) . '/.compile.php'; |
|
| 152 | + $compileScript = realpath($appDir).'/.compile.php'; |
|
| 153 | 153 | if (file_exists($compileScript)) { |
| 154 | 154 | require $compileScript; |
| 155 | 155 | } |