@@ -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 | } |
@@ -212,7 +212,7 @@ |
||
212 | 212 | { |
213 | 213 | $storagePath = Hyde::mediaPath($this->source); |
214 | 214 | |
215 | - if (! file_exists($storagePath)) { |
|
215 | + if (!file_exists($storagePath)) { |
|
216 | 216 | throw new FileNotFoundException(sprintf('Image at %s does not exist', Hyde::pathToRelative($storagePath))); |
217 | 217 | } |
218 | 218 |
@@ -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 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | public static function getInstance(): static |
25 | 25 | { |
26 | - if (! app()->bound(self::class)) { |
|
26 | + if (!app()->bound(self::class)) { |
|
27 | 27 | app()->singleton(self::class); |
28 | 28 | } |
29 | 29 |
@@ -4,19 +4,19 @@ |
||
4 | 4 | |
5 | 5 | require_once __DIR__.'/MicroTest.php'; |
6 | 6 | |
7 | -test('example', function () { |
|
7 | +test('example', function() { |
|
8 | 8 | $this->assert(true); |
9 | 9 | }); |
10 | 10 | |
11 | -test('can install node dependencies', function () { |
|
12 | - $this->assert(! file_exists(BASE_PATH.'/node_modules'), 'Node modules already exist'); |
|
11 | +test('can install node dependencies', function() { |
|
12 | + $this->assert(!file_exists(BASE_PATH.'/node_modules'), 'Node modules already exist'); |
|
13 | 13 | |
14 | 14 | shell_exec('cd '.BASE_PATH.' && npm install'); |
15 | 15 | |
16 | 16 | $this->assert(file_exists(BASE_PATH.'/node_modules'), 'Node modules do not exist'); |
17 | 17 | }); |
18 | 18 | |
19 | -test('can build assets using laravel mix', function () { |
|
19 | +test('can build assets using laravel mix', function() { |
|
20 | 20 | $output = shell_exec('cd '.BASE_PATH.' && npm run dev'); |
21 | 21 | |
22 | 22 | $this->assert(file_exists(BASE_PATH.'/_media/app.css'), 'CSS file does not exist'); |
@@ -4,26 +4,26 @@ |
||
4 | 4 | |
5 | 5 | require_once __DIR__.'/MicroTest.php'; |
6 | 6 | |
7 | -test('example', function () { |
|
7 | +test('example', function() { |
|
8 | 8 | $this->assert(true); |
9 | 9 | }); |
10 | 10 | |
11 | -test('can install composer dependencies', function () { |
|
12 | - $this->assert(! file_exists(BASE_PATH.'/vendor/autoload.php'), 'Autoloader already exists'); |
|
11 | +test('can install composer dependencies', function() { |
|
12 | + $this->assert(!file_exists(BASE_PATH.'/vendor/autoload.php'), 'Autoloader already exists'); |
|
13 | 13 | |
14 | 14 | shell_exec('cd '.BASE_PATH.' && composer install'); |
15 | 15 | |
16 | 16 | $this->assert(file_exists(BASE_PATH.'/vendor/autoload.php'), 'Autoloader does not exist'); |
17 | 17 | }); |
18 | 18 | |
19 | -test('can run the HydeCLI binary', function () { |
|
19 | +test('can run the HydeCLI binary', function() { |
|
20 | 20 | $output = shell_exec('cd '.BASE_PATH.' && php hyde --no-ansi'); |
21 | 21 | $this->assert(str_contains($output, 'USAGE: hyde <command> [options] [arguments]'), |
22 | 22 | 'HydeCLI output does not contain "USAGE: hyde <command> [options] [arguments]"' |
23 | 23 | ); |
24 | 24 | }); |
25 | 25 | |
26 | -test('can build the static site', function () { |
|
26 | +test('can build the static site', function() { |
|
27 | 27 | $output = shell_exec('cd '.BASE_PATH.' && php hyde build --no-ansi'); |
28 | 28 | |
29 | 29 | $this->assert(str_contains($output, 'Building your static site!'), |