Passed
Push — master ( b6f457...706a45 )
by Caen
03:44 queued 17s
created
packages/framework/src/helpers.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
     use Hyde\Foundation\HydeKernel;
7 7
     use JetBrains\PhpStorm\Deprecated;
8 8
 
9
-    if (! function_exists('hyde')) {
9
+    if (!function_exists('hyde')) {
10 10
         /**
11 11
          * Get the available HydeKernel instance.
12 12
          */
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         }
17 17
     }
18 18
 
19
-    if (! function_exists('unslash')) {
19
+    if (!function_exists('unslash')) {
20 20
         /**
21 21
          * Remove trailing slashes from the start and end of a string.
22 22
          *
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     if (defined('HYDE_COMPATIBILITY_MODE') && HYDE_COMPATIBILITY_MODE === true) {
35 35
         // Don't declare these functions when running in compatibility mode.
36 36
     } else {
37
-        if (! function_exists('asset')) {
37
+        if (!function_exists('asset')) {
38 38
             /**
39 39
              * Get a relative link or URL to an asset in the media directory.
40 40
              */
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             }
45 45
         }
46 46
 
47
-        if (! function_exists('route')) {
47
+        if (!function_exists('route')) {
48 48
             /**
49 49
              * Get a page route instance by its key. Casting it to a string will return a relative link to the page.
50 50
              */
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             }
55 55
         }
56 56
 
57
-        if (! function_exists('url')) {
57
+        if (!function_exists('url')) {
58 58
             /**
59 59
              * Get a qualified URL to the supplied path if a base URL is set.
60 60
              */
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     use function trim;
80 80
     use function md5;
81 81
 
82
-    if (! function_exists('\Hyde\hyde')) {
82
+    if (!function_exists('\Hyde\hyde')) {
83 83
         /**
84 84
          * Get the available HydeKernel instance.
85 85
          */
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         }
90 90
     }
91 91
 
92
-    if (! function_exists('\Hyde\unslash')) {
92
+    if (!function_exists('\Hyde\unslash')) {
93 93
         /**
94 94
          * Remove trailing slashes from the start and end of a string.
95 95
          */
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         }
100 100
     }
101 101
 
102
-    if (! function_exists('\Hyde\unixsum')) {
102
+    if (!function_exists('\Hyde\unixsum')) {
103 103
         /**
104 104
          * A EOL agnostic wrapper for calculating MD5 checksums.
105 105
          *
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         }
112 112
     }
113 113
 
114
-    if (! function_exists('\Hyde\unixsum_file')) {
114
+    if (!function_exists('\Hyde\unixsum_file')) {
115 115
         /**
116 116
          * Shorthand for {@see unixsum()} but loads a file.
117 117
          */
@@ -121,63 +121,63 @@  discard block
 block discarded – undo
121 121
         }
122 122
     }
123 123
 
124
-    if (! function_exists('\Hyde\make_title')) {
124
+    if (!function_exists('\Hyde\make_title')) {
125 125
         function make_title(string $value): string
126 126
         {
127 127
             return hyde()->makeTitle($value);
128 128
         }
129 129
     }
130 130
 
131
-    if (! function_exists('\Hyde\normalize_newlines')) {
131
+    if (!function_exists('\Hyde\normalize_newlines')) {
132 132
         function normalize_newlines(string $string): string
133 133
         {
134 134
             return hyde()->normalizeNewlines($string);
135 135
         }
136 136
     }
137 137
 
138
-    if (! function_exists('\Hyde\strip_newlines')) {
138
+    if (!function_exists('\Hyde\strip_newlines')) {
139 139
         function strip_newlines(string $string): string
140 140
         {
141 141
             return hyde()->stripNewlines($string);
142 142
         }
143 143
     }
144 144
 
145
-    if (! function_exists('\Hyde\trim_slashes')) {
145
+    if (!function_exists('\Hyde\trim_slashes')) {
146 146
         function trim_slashes(string $string): string
147 147
         {
148 148
             return hyde()->trimSlashes($string);
149 149
         }
150 150
     }
151 151
 
152
-    if (! function_exists('\Hyde\evaluate_arrayable')) {
152
+    if (!function_exists('\Hyde\evaluate_arrayable')) {
153 153
         function evaluate_arrayable(array|Arrayable $array): array
154 154
         {
155 155
             return $array instanceof Arrayable ? $array->toArray() : $array;
156 156
         }
157 157
     }
158 158
 
159
-    if (! function_exists('\Hyde\yaml_encode')) {
159
+    if (!function_exists('\Hyde\yaml_encode')) {
160 160
         function yaml_encode(mixed $input, int $inline = 2, int $indent = 4, int $flags = 0): string
161 161
         {
162 162
             return Yaml::dump($input instanceof Arrayable ? $input->toArray() : $input, $inline, $indent, $flags);
163 163
         }
164 164
     }
165 165
 
166
-    if (! function_exists('\Hyde\yaml_decode')) {
166
+    if (!function_exists('\Hyde\yaml_decode')) {
167 167
         function yaml_decode(string $input, int $flags = 0): mixed
168 168
         {
169 169
             return Yaml::parse($input, $flags);
170 170
         }
171 171
     }
172 172
 
173
-    if (! function_exists('\Hyde\path_join')) {
173
+    if (!function_exists('\Hyde\path_join')) {
174 174
         function path_join(string $directory, string ...$paths): string
175 175
         {
176 176
             return implode('/', array_merge([$directory], $paths));
177 177
         }
178 178
     }
179 179
 
180
-    if (! function_exists('\Hyde\normalize_slashes')) {
180
+    if (!function_exists('\Hyde\normalize_slashes')) {
181 181
         function normalize_slashes(string $string): string
182 182
         {
183 183
             return str_replace('\\', '/', $string);
Please login to merge, or discard this patch.