@@ -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); |