@@ -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 | */ |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | if (defined('HYDE_COMPATIBILITY_MODE') && HYDE_COMPATIBILITY_MODE === true) { |
29 | 29 | // Don't declare these functions when running in compatibility mode. |
30 | 30 | } else { |
31 | - if (! function_exists('asset')) { |
|
31 | + if (!function_exists('asset')) { |
|
32 | 32 | /** |
33 | 33 | * Get a relative link or URL to an asset in the media directory. |
34 | 34 | */ |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | - if (! function_exists('route')) { |
|
41 | + if (!function_exists('route')) { |
|
42 | 42 | /** |
43 | 43 | * Get a page route by its key. |
44 | 44 | */ |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | } |
49 | 49 | } |
50 | 50 | |
51 | - if (! function_exists('url')) { |
|
51 | + if (!function_exists('url')) { |
|
52 | 52 | /** |
53 | 53 | * Get a qualified URL to the supplied path if a base URL is set. |
54 | 54 | */ |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | use function trim; |
74 | 74 | use function md5; |
75 | 75 | |
76 | - if (! function_exists('\Hyde\hyde')) { |
|
76 | + if (!function_exists('\Hyde\hyde')) { |
|
77 | 77 | /** |
78 | 78 | * Get the available HydeKernel instance. |
79 | 79 | */ |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | } |
85 | 85 | |
86 | - if (! function_exists('\Hyde\unslash')) { |
|
86 | + if (!function_exists('\Hyde\unslash')) { |
|
87 | 87 | /** |
88 | 88 | * Remove trailing slashes from the start and end of a string. |
89 | 89 | */ |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
96 | - if (! function_exists('\Hyde\unixsum')) { |
|
96 | + if (!function_exists('\Hyde\unixsum')) { |
|
97 | 97 | /** |
98 | 98 | * A EOL agnostic wrapper for calculating MD5 checksums. |
99 | 99 | * |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | } |
106 | 106 | } |
107 | 107 | |
108 | - if (! function_exists('\Hyde\unixsum_file')) { |
|
108 | + if (!function_exists('\Hyde\unixsum_file')) { |
|
109 | 109 | /** |
110 | 110 | * Shorthand for {@see unixsum()} but loads a file. |
111 | 111 | */ |
@@ -115,63 +115,63 @@ discard block |
||
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
118 | - if (! function_exists('\Hyde\make_title')) { |
|
118 | + if (!function_exists('\Hyde\make_title')) { |
|
119 | 119 | function make_title(string $value): string |
120 | 120 | { |
121 | 121 | return hyde()->makeTitle($value); |
122 | 122 | } |
123 | 123 | } |
124 | 124 | |
125 | - if (! function_exists('\Hyde\normalize_newlines')) { |
|
125 | + if (!function_exists('\Hyde\normalize_newlines')) { |
|
126 | 126 | function normalize_newlines(string $string): string |
127 | 127 | { |
128 | 128 | return hyde()->normalizeNewlines($string); |
129 | 129 | } |
130 | 130 | } |
131 | 131 | |
132 | - if (! function_exists('\Hyde\strip_newlines')) { |
|
132 | + if (!function_exists('\Hyde\strip_newlines')) { |
|
133 | 133 | function strip_newlines(string $string): string |
134 | 134 | { |
135 | 135 | return hyde()->stripNewlines($string); |
136 | 136 | } |
137 | 137 | } |
138 | 138 | |
139 | - if (! function_exists('\Hyde\trim_slashes')) { |
|
139 | + if (!function_exists('\Hyde\trim_slashes')) { |
|
140 | 140 | function trim_slashes(string $string): string |
141 | 141 | { |
142 | 142 | return hyde()->trimSlashes($string); |
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
146 | - if (! function_exists('\Hyde\evaluate_arrayable')) { |
|
146 | + if (!function_exists('\Hyde\evaluate_arrayable')) { |
|
147 | 147 | function evaluate_arrayable(array|Arrayable $array): array |
148 | 148 | { |
149 | 149 | return $array instanceof Arrayable ? $array->toArray() : $array; |
150 | 150 | } |
151 | 151 | } |
152 | 152 | |
153 | - if (! function_exists('\Hyde\yaml_encode')) { |
|
153 | + if (!function_exists('\Hyde\yaml_encode')) { |
|
154 | 154 | function yaml_encode(mixed $input, int $inline = 2, int $indent = 4, int $flags = 0): string |
155 | 155 | { |
156 | 156 | return Yaml::dump($input instanceof Arrayable ? $input->toArray() : $input, $inline, $indent, $flags); |
157 | 157 | } |
158 | 158 | } |
159 | 159 | |
160 | - if (! function_exists('\Hyde\yaml_decode')) { |
|
160 | + if (!function_exists('\Hyde\yaml_decode')) { |
|
161 | 161 | function yaml_decode(string $input, int $flags = 0): mixed |
162 | 162 | { |
163 | 163 | return Yaml::parse($input, $flags); |
164 | 164 | } |
165 | 165 | } |
166 | 166 | |
167 | - if (! function_exists('\Hyde\path_join')) { |
|
167 | + if (!function_exists('\Hyde\path_join')) { |
|
168 | 168 | function path_join(string $directory, string ...$paths): string |
169 | 169 | { |
170 | 170 | return implode('/', array_merge([$directory], $paths)); |
171 | 171 | } |
172 | 172 | } |
173 | 173 | |
174 | - if (! function_exists('\Hyde\normalize_slashes')) { |
|
174 | + if (!function_exists('\Hyde\normalize_slashes')) { |
|
175 | 175 | function normalize_slashes(string $string): string |
176 | 176 | { |
177 | 177 | return str_replace('\\', '/', $string); |