@@ -16,7 +16,7 @@ |
||
| 16 | 16 | return '<link rel="'.e($this->rel).'" href="'.e($this->href).'">'; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | - $attributes = collect($this->attr)->map(function ($value, $key) { |
|
| 19 | + $attributes = collect($this->attr)->map(function($value, $key) { |
|
| 20 | 20 | return e($key).'="'.e($value).'"'; |
| 21 | 21 | })->implode(' '); |
| 22 | 22 | |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use Illuminate\Support\Facades\File; |
| 4 | 4 | |
| 5 | -if (! function_exists('unlinkIfExists')) { |
|
| 5 | +if (!function_exists('unlinkIfExists')) { |
|
| 6 | 6 | function unlinkIfExists(string $filepath): void |
| 7 | 7 | { |
| 8 | 8 | if (file_exists($filepath)) { |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -if (! function_exists('backupDirectory')) { |
|
| 14 | +if (!function_exists('backupDirectory')) { |
|
| 15 | 15 | /** @deprecated v0.60.x - You should not run tests in a production environment. */ |
| 16 | 16 | function backupDirectory(string $directory): void |
| 17 | 17 | { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | } |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | -if (! function_exists('restoreDirectory')) { |
|
| 24 | +if (!function_exists('restoreDirectory')) { |
|
| 25 | 25 | /** @deprecated v0.60.x - You should not run tests in a production environment. */ |
| 26 | 26 | function restoreDirectory(string $directory): void |
| 27 | 27 | { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | -if (! function_exists('deleteDirectory')) { |
|
| 35 | +if (!function_exists('deleteDirectory')) { |
|
| 36 | 36 | function deleteDirectory(string $directory): void |
| 37 | 37 | { |
| 38 | 38 | if (file_exists($directory)) { |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | -if (! function_exists('unlinkUnlessDefault')) { |
|
| 44 | +if (!function_exists('unlinkUnlessDefault')) { |
|
| 45 | 45 | function unlinkUnlessDefault(string $filepath): void |
| 46 | 46 | { |
| 47 | 47 | $protected = [ |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | '.gitkeep', |
| 52 | 52 | ]; |
| 53 | 53 | |
| 54 | - if (! in_array(basename($filepath), $protected)) { |
|
| 54 | + if (!in_array(basename($filepath), $protected)) { |
|
| 55 | 55 | unlink($filepath); |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | |
| 150 | 150 | protected function needsToBeBooted(): void |
| 151 | 151 | { |
| 152 | - if (! $this->booted) { |
|
| 152 | + if (!$this->booted) { |
|
| 153 | 153 | $this->boot(); |
| 154 | 154 | } |
| 155 | 155 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | public function check_documentation_site_has_an_index_page(Result $result): Result |
| 65 | 65 | { |
| 66 | - if (! Features::hasDocumentationPages()) { |
|
| 66 | + if (!Features::hasDocumentationPages()) { |
|
| 67 | 67 | return $result->skip('Does documentation site have an index page?') |
| 68 | 68 | ->withTip('Skipped because: The documentation page feature is disabled in config'); |
| 69 | 69 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | public function check_a_torchlight_api_token_is_set(Result $result): Result |
| 110 | 110 | { |
| 111 | - if (! Features::enabled(Features::torchlight())) { |
|
| 111 | + if (!Features::enabled(Features::torchlight())) { |
|
| 112 | 112 | return $result->skip('Check a Torchlight API token is set') |
| 113 | 113 | ->withTip('Torchlight is an API for code syntax highlighting. You can enable it in the Hyde config.'); |
| 114 | 114 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public static function needsDirectory(string $directory): void |
| 16 | 16 | { |
| 17 | - if (! file_exists($directory)) { |
|
| 17 | + if (!file_exists($directory)) { |
|
| 18 | 18 | mkdir($directory, recursive: true); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | { |
| 51 | 51 | /** @var DocumentationPage $page */ |
| 52 | 52 | foreach (DocumentationPage::all() as $page) { |
| 53 | - if (! in_array($page->identifier, config('docs.exclude_from_search', []))) { |
|
| 53 | + if (!in_array($page->identifier, config('docs.exclude_from_search', []))) { |
|
| 54 | 54 | $this->searchIndex->push( |
| 55 | 55 | $this->generatePageEntry($page) |
| 56 | 56 | ); |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use Hyde\Framework\HydeKernel; |
| 4 | 4 | |
| 5 | -if (! function_exists('hyde')) { |
|
| 5 | +if (!function_exists('hyde')) { |
|
| 6 | 6 | /** |
| 7 | 7 | * Get the available HydeKernel instance. |
| 8 | 8 | * |
@@ -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 | * |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | /* |
| 18 | 18 | * Enable auto-discovery. |
| 19 | 19 | */ |
| 20 | - $this->app->singleton(PackageManifest::class, function () { |
|
| 20 | + $this->app->singleton(PackageManifest::class, function() { |
|
| 21 | 21 | return new PackageManifest( |
| 22 | 22 | new Filesystem, |
| 23 | 23 | $this->basePath(), |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | { |
| 25 | 25 | $path = static::path($filename); |
| 26 | 26 | |
| 27 | - if (! file_exists($path)) { |
|
| 27 | + if (!file_exists($path)) { |
|
| 28 | 28 | return $default; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | $path = static::path(basename($filename, '.md').'.md'); |
| 38 | 38 | |
| 39 | - if (! file_exists($path)) { |
|
| 39 | + if (!file_exists($path)) { |
|
| 40 | 40 | return $default === null ? null : Markdown::render($default); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | { |
| 49 | 49 | $path = static::path(basename($filename, '.blade.php').'.blade.php'); |
| 50 | 50 | |
| 51 | - if (! file_exists($path)) { |
|
| 51 | + if (!file_exists($path)) { |
|
| 52 | 52 | return $default === null ? null : Blade::render($default); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | protected static function needsDirectory(string $directory): void |
| 59 | 59 | { |
| 60 | - if (! file_exists($directory)) { |
|
| 60 | + if (!file_exists($directory)) { |
|
| 61 | 61 | mkdir($directory, recursive: true); |
| 62 | 62 | } |
| 63 | 63 | } |