@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | protected static function needsDirectory(string $directory): void |
| 20 | 20 | { |
| 21 | - if (! Filesystem::exists($directory)) { |
|
| 21 | + if (!Filesystem::exists($directory)) { |
|
| 22 | 22 | Filesystem::makeDirectory($directory, recursive: true); |
| 23 | 23 | } |
| 24 | 24 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | protected static function needsKernel(): void |
| 15 | 15 | { |
| 16 | - if (! self::$hasSetUpKernel) { |
|
| 16 | + if (!self::$hasSetUpKernel) { |
|
| 17 | 17 | self::setupKernel(); |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | return $this->__call('compile', []); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - if ($this->getBladeView() && ! $this->getContents()) { |
|
| 97 | + if ($this->getBladeView() && !$this->getContents()) { |
|
| 98 | 98 | if (str_ends_with($this->getBladeView(), '.blade.php')) { |
| 99 | 99 | // If the view key is for a Blade file path, we'll use the anonymous view compiler to compile it. |
| 100 | 100 | // This allows you to use any arbitrary file, without needing to register its namespace or directory. |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function __call(string $method, array $parameters): mixed |
| 134 | 134 | { |
| 135 | - if (! $this->hasMacro($method)) { |
|
| 135 | + if (!$this->hasMacro($method)) { |
|
| 136 | 136 | throw new BadMethodCallException(sprintf( |
| 137 | 137 | 'Method %s::%s does not exist.', static::class, $method |
| 138 | 138 | )); |
@@ -29,14 +29,14 @@ |
||
| 29 | 29 | |
| 30 | 30 | public function headers(): array |
| 31 | 31 | { |
| 32 | - return array_map(function (string $key): string { |
|
| 32 | + return array_map(function(string $key): string { |
|
| 33 | 33 | return ucwords(str_replace('_', ' ', $key)); |
| 34 | 34 | }, array_keys($this->routes[0])); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | protected function generate(): array |
| 38 | 38 | { |
| 39 | - return collect(Hyde::routes())->map(function (Route $route): array { |
|
| 39 | + return collect(Hyde::routes())->map(function(Route $route): array { |
|
| 40 | 40 | return $this->routeToListItem($route)->toArray(); |
| 41 | 41 | })->values()->toArray(); |
| 42 | 42 | } |
@@ -53,6 +53,6 @@ |
||
| 53 | 53 | |
| 54 | 54 | protected function isPageDiscoverable(): bool |
| 55 | 55 | { |
| 56 | - return $this->route->getSourcePath() && ! $this->route->getPage() instanceof InMemoryPage; |
|
| 56 | + return $this->route->getSourcePath() && !$this->route->getPage() instanceof InMemoryPage; |
|
| 57 | 57 | } |
| 58 | 58 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | /** @codeCoverageIgnore Until output is testable */ |
| 55 | 55 | protected function runServerProcess(string $command): void |
| 56 | 56 | { |
| 57 | - Process::forever()->run($command, function (string $type, string $line): void { |
|
| 57 | + Process::forever()->run($command, function(string $type, string $line): void { |
|
| 58 | 58 | $this->output->write($line); |
| 59 | 59 | }); |
| 60 | 60 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | throw new BadMethodCallException('Cannot register an extension after the Kernel has been booted.'); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - if (! is_subclass_of($extension, HydeExtension::class)) { |
|
| 42 | + if (!is_subclass_of($extension, HydeExtension::class)) { |
|
| 43 | 43 | // We want to make sure that the extension class extends the HydeExtension class, |
| 44 | 44 | // so that we won't have to check the methods we need to call exist later on. |
| 45 | 45 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function getExtension(string $extension): HydeExtension |
| 65 | 65 | { |
| 66 | - if (! isset($this->extensions[$extension])) { |
|
| 66 | + if (!isset($this->extensions[$extension])) { |
|
| 67 | 67 | throw new InvalidArgumentException("Extension [$extension] is not registered."); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | /** @return array<class-string<\Hyde\Pages\Concerns\HydePage>> */ |
| 96 | 96 | public function getRegisteredPageClasses(): array |
| 97 | 97 | { |
| 98 | - return array_unique(array_merge(...array_map(function (string $extension): array { |
|
| 98 | + return array_unique(array_merge(...array_map(function(string $extension): array { |
|
| 99 | 99 | /** @var <class-string<\Hyde\Foundation\Concerns\HydeExtension>> $extension */ |
| 100 | 100 | return $extension::getPageClasses(); |
| 101 | 101 | }, $this->getRegisteredExtensions()))); |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | |
| 106 | 106 | protected function findTasksInAppDirectory(): array |
| 107 | 107 | { |
| 108 | - return Filesystem::smartGlob('app/Actions/*BuildTask.php')->map(function (string $file): string { |
|
| 108 | + return Filesystem::smartGlob('app/Actions/*BuildTask.php')->map(function(string $file): string { |
|
| 109 | 109 | return static::pathToClassName($file); |
| 110 | 110 | })->toArray(); |
| 111 | 111 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | { |
| 40 | 40 | $this->startClock(); |
| 41 | 41 | |
| 42 | - if ($output && ! $this->output) { |
|
| 42 | + if ($output && !$this->output) { |
|
| 43 | 43 | $this->setOutput($output); |
| 44 | 44 | } |
| 45 | 45 | |