@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Hyde\Foundation\HydeKernel; |
| 6 | 6 | |
| 7 | -if (! function_exists('hyde')) { |
|
| 7 | +if (!function_exists('hyde')) { |
|
| 8 | 8 | /** |
| 9 | 9 | * Get the available HydeKernel instance. |
| 10 | 10 | */ |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | } |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | -if (! function_exists('unslash')) { |
|
| 17 | +if (!function_exists('unslash')) { |
|
| 18 | 18 | /** |
| 19 | 19 | * Remove trailing slashes from the start and end of a string. |
| 20 | 20 | */ |
@@ -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 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | { |
| 81 | 81 | // Scan the source directory, and directories therein, for files that match the model's file extension. |
| 82 | 82 | foreach (glob($this->kernel->path($pageClass::sourcePath('{*,**/*}')), GLOB_BRACE) as $filepath) { |
| 83 | - if (! str_starts_with(basename((string) $filepath), '_')) { |
|
| 83 | + if (!str_starts_with(basename((string) $filepath), '_')) { |
|
| 84 | 84 | $this->put($this->kernel->pathToRelative($filepath), File::make($filepath)->belongsTo($pageClass)); |
| 85 | 85 | } |
| 86 | 86 | } |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Rector\Config\RectorConfig; |
| 6 | 6 | use Rector\Laravel\Set\LaravelSetList; |
| 7 | 7 | |
| 8 | -return static function (RectorConfig $rectorConfig): void { |
|
| 8 | +return static function(RectorConfig $rectorConfig): void { |
|
| 9 | 9 | $rectorConfig->paths([__DIR__.'/packages/framework/src']); |
| 10 | 10 | $rectorConfig->sets([ |
| 11 | 11 | LaravelSetList::LARAVEL_90, |