We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('backpack_url')) { |
|
3 | +if (!function_exists('backpack_url')) { |
|
4 | 4 | /** |
5 | 5 | * Appends the configured backpack prefix and returns |
6 | 6 | * the URL using the standard Laravel helpers. |
@@ -10,13 +10,13 @@ discard block |
||
10 | 10 | */ |
11 | 11 | function backpack_url($path = null, $parameters = [], $secure = null) |
12 | 12 | { |
13 | - $path = ! $path || (substr($path, 0, 1) == '/') ? $path : '/'.$path; |
|
13 | + $path = !$path || (substr($path, 0, 1) == '/') ? $path : '/'.$path; |
|
14 | 14 | |
15 | 15 | return url(config('backpack.base.route_prefix', 'admin').$path, $parameters, $secure); |
16 | 16 | } |
17 | 17 | } |
18 | 18 | |
19 | -if (! function_exists('backpack_authentication_column')) { |
|
19 | +if (!function_exists('backpack_authentication_column')) { |
|
20 | 20 | /** |
21 | 21 | * Return the username column name. |
22 | 22 | * The Laravel default (and Backpack default) is 'email'. |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
32 | -if (! function_exists('backpack_form_input')) { |
|
32 | +if (!function_exists('backpack_form_input')) { |
|
33 | 33 | /** |
34 | 34 | * Parse the submitted input in request('form') to an usable array. |
35 | 35 | * Joins the multiple[] fields in a single key and transform the dot notation fields into arrayed ones. |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | if (is_null($input_arg)) { |
61 | - if (! isset($result[$input_key])) { |
|
61 | + if (!isset($result[$input_key])) { |
|
62 | 62 | $result[$input_key] = $start ? [$row['value']] : $row['value']; |
63 | 63 | } else { |
64 | 64 | array_push($result[$input_key], $row['value']); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | } |
74 | 74 | |
75 | -if (! function_exists('backpack_users_have_email')) { |
|
75 | +if (!function_exists('backpack_users_have_email')) { |
|
76 | 76 | /** |
77 | 77 | * Check if the email column is present on the user table. |
78 | 78 | * |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | } |
89 | 89 | |
90 | -if (! function_exists('backpack_avatar_url')) { |
|
90 | +if (!function_exists('backpack_avatar_url')) { |
|
91 | 91 | /** |
92 | 92 | * Returns the avatar URL of a user. |
93 | 93 | * |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | } |
120 | 120 | } |
121 | 121 | |
122 | -if (! function_exists('backpack_middleware')) { |
|
122 | +if (!function_exists('backpack_middleware')) { |
|
123 | 123 | /** |
124 | 124 | * Return the key of the middleware used across Backpack. |
125 | 125 | * That middleware checks if the visitor is an admin. |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | } |
135 | 135 | |
136 | -if (! function_exists('backpack_guard_name')) { |
|
136 | +if (!function_exists('backpack_guard_name')) { |
|
137 | 137 | /* |
138 | 138 | * Returns the name of the guard defined |
139 | 139 | * by the application config |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | } |
146 | 146 | |
147 | -if (! function_exists('backpack_auth')) { |
|
147 | +if (!function_exists('backpack_auth')) { |
|
148 | 148 | /* |
149 | 149 | * Returns the user instance if it exists |
150 | 150 | * of the currently authenticated admin |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | } |
158 | 158 | |
159 | -if (! function_exists('backpack_user')) { |
|
159 | +if (!function_exists('backpack_user')) { |
|
160 | 160 | /* |
161 | 161 | * Returns back a user instance without |
162 | 162 | * the admin guard, however allows you |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | } |
170 | 170 | |
171 | -if (! function_exists('mb_ucfirst')) { |
|
171 | +if (!function_exists('mb_ucfirst')) { |
|
172 | 172 | /** |
173 | 173 | * Capitalize the first letter of a string, |
174 | 174 | * even if that string is multi-byte (non-latin alphabet). |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | } |
190 | 190 | } |
191 | 191 | |
192 | -if (! function_exists('backpack_view')) { |
|
192 | +if (!function_exists('backpack_view')) { |
|
193 | 193 | /** |
194 | 194 | * Returns a new displayable view based on the configured backpack view namespace. |
195 | 195 | * If that view doesn't exist, it will load the one from the original theme. |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | |
209 | 209 | $returnView = $theme.$view; |
210 | 210 | |
211 | - if (! view()->exists($returnView)) { |
|
211 | + if (!view()->exists($returnView)) { |
|
212 | 212 | $returnView = $originalTheme.$view; |
213 | 213 | } |
214 | 214 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | } |
217 | 217 | } |
218 | 218 | |
219 | -if (! function_exists('square_brackets_to_dots')) { |
|
219 | +if (!function_exists('square_brackets_to_dots')) { |
|
220 | 220 | /** |
221 | 221 | * Turns a string from bracket-type array to dot-notation array. |
222 | 222 | * Ex: array[0][property] turns into array.0.property. |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | } |
233 | 233 | } |
234 | 234 | |
235 | -if (! function_exists('is_countable')) { |
|
235 | +if (!function_exists('is_countable')) { |
|
236 | 236 | /** |
237 | 237 | * We need this because is_countable was only introduced in PHP 7.3, |
238 | 238 | * and in PHP 7.2 you should check if count() argument is really countable. |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | } |
248 | 248 | } |
249 | 249 | |
250 | -if (! function_exists('old_empty_or_null')) { |
|
250 | +if (!function_exists('old_empty_or_null')) { |
|
251 | 251 | /** |
252 | 252 | * This method is an alternative to Laravel's old() helper, which mistakenly |
253 | 253 | * returns NULL it two cases: |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | } |
280 | 280 | } |
281 | 281 | |
282 | -if (! function_exists('is_multidimensional_array')) { |
|
282 | +if (!function_exists('is_multidimensional_array')) { |
|
283 | 283 | /** |
284 | 284 | * If any of the items inside a given array is an array, the array is considered multidimensional. |
285 | 285 | * |
@@ -297,7 +297,7 @@ |
||
297 | 297 | |
298 | 298 | // otherwise, loop through all the possible view namespaces |
299 | 299 | // until you find a view that exists |
300 | - $paths = array_map(function ($item) use ($viewPath) { |
|
300 | + $paths = array_map(function($item) use ($viewPath) { |
|
301 | 301 | return $item.'.'.$viewPath; |
302 | 302 | }, config('backpack.crud.view_namespaces.fields')); |
303 | 303 |