Completed
Push — compiler ( c86005...d6bb7f )
by Akihito
01:36
created
src/Provide/Transfer/CliResponder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,11 +37,11 @@
 block discarded – undo
37 37
         $output = $isModified ? $this->getOutput($ro, $server) : $this->condResponse->getOutput($ro->headers);
38 38
 
39 39
         $statusText = (new Code())->statusText[$ro->code] ?? '';
40
-        $ob = $output->code . ' ' . $statusText . PHP_EOL;
40
+        $ob = $output->code.' '.$statusText.PHP_EOL;
41 41
 
42 42
         // header
43 43
         foreach ($output->headers as $label => $value) {
44
-            $ob .= "{$label}: {$value}" . PHP_EOL;
44
+            $ob .= "{$label}: {$value}".PHP_EOL;
45 45
         }
46 46
 
47 47
         // empty line
Please login to merge, or discard this patch.
src/Provide/Error/ProdVndErrorPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     public function toString(): string
30 30
     {
31
-        $this->view = json_encode($this->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL;
31
+        $this->view = json_encode($this->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES).PHP_EOL;
32 32
 
33 33
         return $this->view;
34 34
     }
Please login to merge, or discard this patch.
src/Module.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@
 block discarded – undo
39 39
 
40 40
     private function installContextModule(AbstractAppMeta $appMeta, string $contextItem, AbstractModule $module): AbstractModule
41 41
     {
42
-        $class = $appMeta->name . '\Module\\' . ucwords($contextItem) . 'Module';
43
-        if (! class_exists($class)) {
44
-            $class = 'BEAR\Package\Context\\' . ucwords($contextItem) . 'Module';
42
+        $class = $appMeta->name.'\Module\\'.ucwords($contextItem).'Module';
43
+        if (!class_exists($class)) {
44
+            $class = 'BEAR\Package\Context\\'.ucwords($contextItem).'Module';
45 45
         }
46 46
 
47
-        if (! is_a($class, AbstractModule::class, true)) {
47
+        if (!is_a($class, AbstractModule::class, true)) {
48 48
             throw new InvalidContextException($contextItem);
49 49
         }
50 50
 
Please login to merge, or discard this patch.
src/Compiler/NewInstance.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Compiler/CompileClassMetaInfo.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 {
Please login to merge, or discard this patch.
src/Context/Provider/ProdCacheProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     #[Named('namespace=cache_namespace')]
25 25
     public function __construct(AbstractAppMeta $appMeta, string $namespace)
26 26
     {
27
-        $this->cacheDir = $appMeta->tmpDir . '/cache';
27
+        $this->cacheDir = $appMeta->tmpDir.'/cache';
28 28
         $this->namespace = $namespace;
29 29
     }
30 30
 
Please login to merge, or discard this patch.
src/Compiler/CompileAutoload.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
121 121
 
122 122
             /** @var class-string $class */
123 123
             $filePath = (string) (new ReflectionClass($class))->getFileName();
124
-            if (! $this->isNotCompileFile($filePath)) {
124
+            if (!$this->isNotCompileFile($filePath)) {
125 125
                 continue; // @codeCoverageIgnore
126 126
             }
127 127
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 %s
152 152
 require __DIR__ . '/vendor/autoload.php';
153 153
 ", $this->context, $requiredFile);
154
-        $fileName = realpath($appDir) . '/autoload.php';
154
+        $fileName = realpath($appDir).'/autoload.php';
155 155
 
156 156
         ($this->filePutContents)($fileName, $autoloadFile);
157 157
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
     private function isNotAutoloadble(string $class): bool
178 178
     {
179
-        return ! class_exists($class, false) && ! interface_exists($class, false) && ! trait_exists($class, false);
179
+        return !class_exists($class, false) && !interface_exists($class, false) && !trait_exists($class, false);
180 180
     }
181 181
 
182 182
     private function isNotCompileFile(string $filePath): bool
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     {
189 189
         $dir = (string) realpath($rootDir);
190 190
         if (strpos($file, $dir) !== false) {
191
-            return (string) preg_replace('#^' . preg_quote($dir, '#') . '#', "__DIR__ . '", $file) . "'";
191
+            return (string) preg_replace('#^'.preg_quote($dir, '#').'#', "__DIR__ . '", $file)."'";
192 192
         }
193 193
 
194 194
         return sprintf("'%s'", $file);
Please login to merge, or discard this patch.
src/Compiler.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
     private function registerLoader(string $appDir): void
146 146
     {
147 147
         $this->unregisterComposerLoader();
148
-        $loaderFile = $appDir . '/vendor/autoload.php';
149
-        if (! file_exists($loaderFile)) {
148
+        $loaderFile = $appDir.'/vendor/autoload.php';
149
+        if (!file_exists($loaderFile)) {
150 150
             throw new RuntimeException('no loader');
151 151
         }
152 152
 
@@ -154,12 +154,12 @@  discard block
 block discarded – undo
154 154
         assert($loader instanceof ClassLoader);
155 155
         spl_autoload_register(
156 156
             /** @var class-string $class */
157
-            function (string $class) use ($loader): void {
157
+            function(string $class) use ($loader): void {
158 158
                 $loader->loadClass($class);
159 159
                 if (
160 160
                     $class !== NullPage::class
161
-                    && ! is_int(strpos($class, 'BEAR\Package\Compiler'))
162
-                    && ! is_int(strpos($class, NullPage::class))
161
+                    && !is_int(strpos($class, 'BEAR\Package\Compiler'))
162
+                    && !is_int(strpos($class, NullPage::class))
163 163
                 ) {
164 164
                     /** @psalm-suppress NullArgument */
165 165
                     $this->classes[] = $class;
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
     private function hookNullObjectClass(string $appDir): void
172 172
     {
173
-        $compileScript = realpath($appDir) . '/.compile.php';
173
+        $compileScript = realpath($appDir).'/.compile.php';
174 174
         if (file_exists($compileScript)) {
175 175
             require $compileScript;
176 176
         }
Please login to merge, or discard this patch.
src/Compiler/CompilePreload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 opcache_compile_file( __DIR__ . '/vendor/autoload.php');
66 66
 
67 67
 %s", $this->context, $requiredOnceFile);
68
-        $fileName = realpath($appMeta->appDir) . '/preload.php';
68
+        $fileName = realpath($appMeta->appDir).'/preload.php';
69 69
         ($this->filePutContents)($fileName, $preloadFile);
70 70
 
71 71
         return $fileName;
Please login to merge, or discard this patch.