Completed
Push — master ( f59a66...f86b8f )
by James
11:05 queued 11s
created
bin/generate-phpstorm-stubs-map.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
 use function substr;
30 30
 use function var_export;
31 31
 
32
-(function () : void {
33
-    require __DIR__ . '/../vendor/autoload.php';
32
+(function() : void {
33
+    require __DIR__.'/../vendor/autoload.php';
34 34
 
35
-    $phpStormStubsDirectory = __DIR__ . '/../vendor/jetbrains/phpstorm-stubs';
35
+    $phpStormStubsDirectory = __DIR__.'/../vendor/jetbrains/phpstorm-stubs';
36 36
 
37 37
     $phpParser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
38 38
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             if ($node instanceof Node\Stmt\ClassLike) {
55 55
                 $className = $node->namespacedName->toString();
56 56
 
57
-                if (! $this->hasPhpStormPrefix($className)) {
57
+                if (!$this->hasPhpStormPrefix($className)) {
58 58
                     $this->classNames[] = $className;
59 59
                 }
60 60
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 /** @psalm-suppress UndefinedPropertyFetch */
66 66
                 $functionName = $node->namespacedName->toString();
67 67
 
68
-                if (! $this->hasPhpStormPrefix($functionName)) {
68
+                if (!$this->hasPhpStormPrefix($functionName)) {
69 69
                     $this->functionNames[] = $functionName;
70 70
                 }
71 71
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
             continue;
159 159
         }
160 160
 
161
-        if (! $directoryInfo->isDir()) {
161
+        if (!$directoryInfo->isDir()) {
162 162
             continue;
163 163
         }
164 164
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
                 continue;
172 172
             }
173 173
 
174
-            if (! preg_match('/\.php$/', $fileInfo->getBasename())) {
174
+            if (!preg_match('/\.php$/', $fileInfo->getBasename())) {
175 175
                 continue;
176 176
             }
177 177
 
@@ -200,10 +200,10 @@  discard block
 block discarded – undo
200 200
         }
201 201
     }
202 202
 
203
-    $mapWithRelativeFilePaths = array_map(static function (array $files) use ($phpStormStubsDirectory) : array {
203
+    $mapWithRelativeFilePaths = array_map(static function(array $files) use ($phpStormStubsDirectory) : array {
204 204
         ksort($files);
205 205
 
206
-        return array_map(static function (string $filePath) use ($phpStormStubsDirectory) : string {
206
+        return array_map(static function(string $filePath) use ($phpStormStubsDirectory) : string {
207 207
             return str_replace('\\', '/', substr($filePath, strlen($phpStormStubsDirectory) + 1));
208 208
         }, $files);
209 209
     }, $map);
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 }
233 233
 PHP;
234 234
 
235
-    $mapFile = __DIR__ . '/../src/SourceLocator/SourceStubber/PhpStormStubsMap.php';
235
+    $mapFile = __DIR__.'/../src/SourceLocator/SourceStubber/PhpStormStubsMap.php';
236 236
 
237 237
     $bytesWritten = @file_put_contents($mapFile, $output);
238 238
     if ($bytesWritten === false) {
Please login to merge, or discard this patch.