Completed
Push — compiler ( d67ac2 )
by Akihito
01:29
created
src/Compiler.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
     private function registerLoader(string $appDir): void
133 133
     {
134 134
         $this->unregisterComposerLoader();
135
-        $loaderFile = $appDir . '/vendor/autoload.php';
136
-        if (! file_exists($loaderFile)) {
135
+        $loaderFile = $appDir.'/vendor/autoload.php';
136
+        if (!file_exists($loaderFile)) {
137 137
             throw new RuntimeException('no loader');
138 138
         }
139 139
 
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
         assert($loader instanceof ClassLoader);
142 142
         spl_autoload_register(
143 143
             /** @var class-string $class */
144
-            function (string $class) use ($loader): void {
144
+            function(string $class) use ($loader): void {
145 145
                 $loader->loadClass($class);
146
-                if ($class !== NullPage::class && ! is_int(strpos($class, 'BEAR\Package\Compiler'))) {
146
+                if ($class !== NullPage::class && !is_int(strpos($class, 'BEAR\Package\Compiler'))) {
147 147
                     /** @psalm-suppress NullArgument */
148 148
                     $this->classes[] = $class;
149 149
                 }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
     private function hookNullObjectClass(string $appDir): void
155 155
     {
156
-        $compileScript = realpath($appDir) . '/.compile.php';
156
+        $compileScript = realpath($appDir).'/.compile.php';
157 157
         if (file_exists($compileScript)) {
158 158
             require $compileScript;
159 159
         }
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.