@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | /** Get all the configuration files for the application. */ |
15 | 15 | protected function getConfigurationFiles(Application $app): array |
16 | 16 | { |
17 | - return tap(parent::getConfigurationFiles($app), function (array &$files) use ($app): void { |
|
17 | + return tap(parent::getConfigurationFiles($app), function(array &$files) use ($app): void { |
|
18 | 18 | // Inject our custom config file which is stored in `app/config.php`. |
19 | 19 | $files['app'] = $app->basePath().DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'config.php'; |
20 | 20 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | // If we're running in a Phar and no project config directory exists, |
63 | 63 | // we need to adjust the path to use the bundled static Phar config file. |
64 | 64 | |
65 | - if (\Phar::running() && (! is_dir($files['app']))) { |
|
65 | + if (\Phar::running() && (!is_dir($files['app']))) { |
|
66 | 66 | $files['app'] = dirname(__DIR__, 6).DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'app.php'; |
67 | 67 | } |
68 | 68 | } |
@@ -140,7 +140,7 @@ |
||
140 | 140 | */ |
141 | 141 | public function vendorPath(string $path = '', string $package = 'framework'): string |
142 | 142 | { |
143 | - if (PharSupport::running() && ! PharSupport::hasVendorDirectory()) { |
|
143 | + if (PharSupport::running() && !PharSupport::hasVendorDirectory()) { |
|
144 | 144 | return PharSupport::vendorPath($path, $package); |
145 | 145 | } |
146 | 146 |
@@ -125,7 +125,7 @@ |
||
125 | 125 | |
126 | 126 | protected function validateType(string $pageClass): void |
127 | 127 | { |
128 | - if (! in_array($pageClass, [MarkdownPage::class, BladePage::class, DocumentationPage::class])) { |
|
128 | + if (!in_array($pageClass, [MarkdownPage::class, BladePage::class, DocumentationPage::class])) { |
|
129 | 129 | throw new UnsupportedPageTypeException('The page type must be either "markdown", "blade", or "documentation"'); |
130 | 130 | } |
131 | 131 | } |
@@ -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 | } |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | namespace { |
6 | 6 | use Hyde\Foundation\HydeKernel; |
7 | 7 | |
8 | - if (! function_exists('hyde')) { |
|
8 | + if (!function_exists('hyde')) { |
|
9 | 9 | /** |
10 | 10 | * Get the available HydeKernel instance. |
11 | 11 | */ |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | } |
16 | 16 | } |
17 | 17 | |
18 | - if (! function_exists('unslash')) { |
|
18 | + if (!function_exists('unslash')) { |
|
19 | 19 | /** |
20 | 20 | * Remove trailing slashes from the start and end of a string. |
21 | 21 | */ |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | use Illuminate\Contracts\Support\Arrayable; |
33 | 33 | use Symfony\Component\Yaml\Yaml; |
34 | 34 | |
35 | - if (! function_exists('\Hyde\hyde')) { |
|
35 | + if (!function_exists('\Hyde\hyde')) { |
|
36 | 36 | /** |
37 | 37 | * Get the available HydeKernel instance. |
38 | 38 | */ |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
45 | - if (! function_exists('\Hyde\unslash')) { |
|
45 | + if (!function_exists('\Hyde\unslash')) { |
|
46 | 46 | /** |
47 | 47 | * Remove trailing slashes from the start and end of a string. |
48 | 48 | */ |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
55 | - if (! function_exists('\Hyde\unixsum')) { |
|
55 | + if (!function_exists('\Hyde\unixsum')) { |
|
56 | 56 | /** |
57 | 57 | * A EOL agnostic wrapper for calculating MD5 checksums. |
58 | 58 | * |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | } |
65 | 65 | } |
66 | 66 | |
67 | - if (! function_exists('\Hyde\unixsum_file')) { |
|
67 | + if (!function_exists('\Hyde\unixsum_file')) { |
|
68 | 68 | /** |
69 | 69 | * Shorthand for {@see unixsum()} but loads a file. |
70 | 70 | */ |
@@ -74,63 +74,63 @@ discard block |
||
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
77 | - if (! function_exists('\Hyde\make_title')) { |
|
77 | + if (!function_exists('\Hyde\make_title')) { |
|
78 | 78 | function make_title(string $value): string |
79 | 79 | { |
80 | 80 | return hyde()->makeTitle($value); |
81 | 81 | } |
82 | 82 | } |
83 | 83 | |
84 | - if (! function_exists('\Hyde\normalize_newlines')) { |
|
84 | + if (!function_exists('\Hyde\normalize_newlines')) { |
|
85 | 85 | function normalize_newlines(string $string): string |
86 | 86 | { |
87 | 87 | return hyde()->normalizeNewlines($string); |
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
91 | - if (! function_exists('\Hyde\strip_newlines')) { |
|
91 | + if (!function_exists('\Hyde\strip_newlines')) { |
|
92 | 92 | function strip_newlines(string $string): string |
93 | 93 | { |
94 | 94 | return hyde()->stripNewlines($string); |
95 | 95 | } |
96 | 96 | } |
97 | 97 | |
98 | - if (! function_exists('\Hyde\trim_slashes')) { |
|
98 | + if (!function_exists('\Hyde\trim_slashes')) { |
|
99 | 99 | function trim_slashes(string $string): string |
100 | 100 | { |
101 | 101 | return hyde()->trimSlashes($string); |
102 | 102 | } |
103 | 103 | } |
104 | 104 | |
105 | - if (! function_exists('\Hyde\evaluate_arrayable')) { |
|
105 | + if (!function_exists('\Hyde\evaluate_arrayable')) { |
|
106 | 106 | function evaluate_arrayable(array|Arrayable $array): array |
107 | 107 | { |
108 | 108 | return $array instanceof Arrayable ? $array->toArray() : $array; |
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
112 | - if (! function_exists('\Hyde\yaml_encode')) { |
|
112 | + if (!function_exists('\Hyde\yaml_encode')) { |
|
113 | 113 | function yaml_encode(mixed $input, int $inline = 2, int $indent = 4, int $flags = 0): string |
114 | 114 | { |
115 | 115 | return Yaml::dump($input instanceof Arrayable ? $input->toArray() : $input, $inline, $indent, $flags); |
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
119 | - if (! function_exists('\Hyde\yaml_decode')) { |
|
119 | + if (!function_exists('\Hyde\yaml_decode')) { |
|
120 | 120 | function yaml_decode(string $input, int $flags = 0): mixed |
121 | 121 | { |
122 | 122 | return Yaml::parse($input, $flags); |
123 | 123 | } |
124 | 124 | } |
125 | 125 | |
126 | - if (! function_exists('\Hyde\path_join')) { |
|
126 | + if (!function_exists('\Hyde\path_join')) { |
|
127 | 127 | function path_join(string $directory, string ...$paths): string |
128 | 128 | { |
129 | 129 | return implode('/', array_merge([$directory], $paths)); |
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
133 | - if (! function_exists('\Hyde\normalize_slashes')) { |
|
133 | + if (!function_exists('\Hyde\normalize_slashes')) { |
|
134 | 134 | function normalize_slashes(string $string): string |
135 | 135 | { |
136 | 136 | return str_replace('\\', '/', $string); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function mediaLink(string $destination, bool $validate = false): string |
83 | 83 | { |
84 | - if ($validate && ! file_exists($sourcePath = "{$this->kernel->getMediaDirectory()}/$destination")) { |
|
84 | + if ($validate && !file_exists($sourcePath = "{$this->kernel->getMediaDirectory()}/$destination")) { |
|
85 | 85 | throw new FileNotFoundException($sourcePath); |
86 | 86 | } |
87 | 87 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function hasSiteUrl(): bool |
119 | 119 | { |
120 | - return ! blank(config('hyde.url')); |
|
120 | + return !blank(config('hyde.url')); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -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 | )); |