Passed
Push — master ( fe113d...37f108 )
by Caen
03:30 queued 14s
created
packages/framework/src/Foundation/FileCollection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,26 +22,26 @@  discard block
 block discarded – undo
22 22
 {
23 23
     public function getSourceFiles(?string $pageClass = null): self
24 24
     {
25
-        return ! $pageClass ? $this->getAllSourceFiles() : $this->getSourceFilesFor($pageClass);
25
+        return !$pageClass ? $this->getAllSourceFiles() : $this->getSourceFilesFor($pageClass);
26 26
     }
27 27
 
28 28
     public function getAllSourceFiles(): self
29 29
     {
30
-        return $this->filter(function (File $file) {
30
+        return $this->filter(function(File $file) {
31 31
             return $file->belongsTo !== null;
32 32
         });
33 33
     }
34 34
 
35 35
     public function getSourceFilesFor(string $pageClass): self
36 36
     {
37
-        return $this->filter(function (File $file) use ($pageClass): bool {
37
+        return $this->filter(function(File $file) use ($pageClass): bool {
38 38
             return $file->belongsTo() === $pageClass;
39 39
         });
40 40
     }
41 41
 
42 42
     public function getMediaFiles(): self
43 43
     {
44
-        return $this->filter(function (File $file): bool {
44
+        return $this->filter(function(File $file): bool {
45 45
             return str_starts_with((string) $file, '_media');
46 46
         });
47 47
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         // Scan the source directory, and directories therein, for files that match the model's file extension.
80 80
         foreach (glob($this->kernel->path($pageClass::sourcePath('{*,**/*}')), GLOB_BRACE) as $filepath) {
81
-            if (! str_starts_with(basename($filepath), '_')) {
81
+            if (!str_starts_with(basename($filepath), '_')) {
82 82
                 $this->put($this->kernel->pathToRelative($filepath), File::make($filepath)->belongsTo($pageClass));
83 83
             }
84 84
         }
Please login to merge, or discard this patch.