@@ -22,26 +22,26 @@ discard block |
||
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 |
||
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 | } |