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_email_column')) { |
|
32 | +if (!function_exists('backpack_email_column')) { |
|
33 | 33 | /** |
34 | 34 | * Return the email column name. |
35 | 35 | * The Laravel default (and Backpack default) is 'email'. |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
45 | -if (! function_exists('backpack_form_input')) { |
|
45 | +if (!function_exists('backpack_form_input')) { |
|
46 | 46 | /** |
47 | 47 | * Parse the submitted input in request('form') to an usable array. |
48 | 48 | * Joins the multiple[] fields in a single key and transform the dot notation fields into arrayed ones. |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | $isMultiple = substr($row['name'], -2, 2) === '[]'; |
69 | 69 | |
70 | - if($isMultiple && substr_count($row['name'], '[') === 1) { |
|
70 | + if ($isMultiple && substr_count($row['name'], '[') === 1) { |
|
71 | 71 | $result[substr($row['name'], 0, -2)][] = $row['value']; |
72 | 72 | continue; |
73 | 73 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $parentInputName = substr($row['name'], 0, strpos($row['name'], '[')); |
95 | 95 | |
96 | 96 | if (isset($repeatableRowKey)) { |
97 | - if($isMultiple) { |
|
97 | + if ($isMultiple) { |
|
98 | 98 | $result[$parentInputName][$repeatableRowKey][$inputName][] = $row['value']; |
99 | 99 | continue; |
100 | 100 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | continue; |
105 | 105 | } |
106 | 106 | |
107 | - if($isMultiple) { |
|
107 | + if ($isMultiple) { |
|
108 | 108 | $result[$parentInputName][$inputName][] = $row['value']; |
109 | 109 | continue; |
110 | 110 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
118 | -if (! function_exists('backpack_users_have_email')) { |
|
118 | +if (!function_exists('backpack_users_have_email')) { |
|
119 | 119 | /** |
120 | 120 | * Check if the email column is present on the user table. |
121 | 121 | * |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
133 | -if (! function_exists('backpack_avatar_url')) { |
|
133 | +if (!function_exists('backpack_avatar_url')) { |
|
134 | 134 | /** |
135 | 135 | * Returns the avatar URL of a user. |
136 | 136 | * |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | { |
142 | 142 | switch (config('backpack.base.avatar_type')) { |
143 | 143 | case 'gravatar': |
144 | - if (backpack_users_have_email() && ! empty($user->email)) { |
|
144 | + if (backpack_users_have_email() && !empty($user->email)) { |
|
145 | 145 | return Gravatar::fallback(config('backpack.base.gravatar_fallback'))->get($user->email); |
146 | 146 | } |
147 | 147 | break; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | } |
153 | 153 | } |
154 | 154 | |
155 | -if (! function_exists('backpack_middleware')) { |
|
155 | +if (!function_exists('backpack_middleware')) { |
|
156 | 156 | /** |
157 | 157 | * Return the key of the middleware used across Backpack. |
158 | 158 | * That middleware checks if the visitor is an admin. |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | } |
167 | 167 | } |
168 | 168 | |
169 | -if (! function_exists('backpack_guard_name')) { |
|
169 | +if (!function_exists('backpack_guard_name')) { |
|
170 | 170 | /* |
171 | 171 | * Returns the name of the guard defined |
172 | 172 | * by the application config |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | } |
178 | 178 | } |
179 | 179 | |
180 | -if (! function_exists('backpack_auth')) { |
|
180 | +if (!function_exists('backpack_auth')) { |
|
181 | 181 | /* |
182 | 182 | * Returns the user instance if it exists |
183 | 183 | * of the currently authenticated admin |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | } |
190 | 190 | } |
191 | 191 | |
192 | -if (! function_exists('backpack_user')) { |
|
192 | +if (!function_exists('backpack_user')) { |
|
193 | 193 | /* |
194 | 194 | * Returns back a user instance without |
195 | 195 | * the admin guard, however allows you |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | } |
202 | 202 | } |
203 | 203 | |
204 | -if (! function_exists('mb_ucfirst')) { |
|
204 | +if (!function_exists('mb_ucfirst')) { |
|
205 | 205 | /** |
206 | 206 | * Capitalize the first letter of a string, |
207 | 207 | * even if that string is multi-byte (non-latin alphabet). |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | } |
223 | 223 | } |
224 | 224 | |
225 | -if (! function_exists('backpack_view')) { |
|
225 | +if (!function_exists('backpack_view')) { |
|
226 | 226 | /** |
227 | 227 | * Returns a new displayable view based on the configured backpack view namespace. |
228 | 228 | * If that view doesn't exist, it will load the one from the original theme. |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | |
242 | 242 | $returnView = $theme.$view; |
243 | 243 | |
244 | - if (! view()->exists($returnView)) { |
|
244 | + if (!view()->exists($returnView)) { |
|
245 | 245 | $returnView = $originalTheme.$view; |
246 | 246 | } |
247 | 247 | |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } |
250 | 250 | } |
251 | 251 | |
252 | -if (! function_exists('square_brackets_to_dots')) { |
|
252 | +if (!function_exists('square_brackets_to_dots')) { |
|
253 | 253 | /** |
254 | 254 | * Turns a string from bracket-type array to dot-notation array. |
255 | 255 | * Ex: array[0][property] turns into array.0.property. |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | } |
266 | 266 | } |
267 | 267 | |
268 | -if (! function_exists('old_empty_or_null')) { |
|
268 | +if (!function_exists('old_empty_or_null')) { |
|
269 | 269 | /** |
270 | 270 | * This method is an alternative to Laravel's old() helper, which mistakenly |
271 | 271 | * returns NULL it two cases: |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | } |
298 | 298 | } |
299 | 299 | |
300 | -if (! function_exists('is_multidimensional_array')) { |
|
300 | +if (!function_exists('is_multidimensional_array')) { |
|
301 | 301 | /** |
302 | 302 | * If any of the items inside a given array is an array, the array is considered multidimensional. |
303 | 303 | * |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | } |
317 | 317 | } |
318 | 318 | |
319 | -if (! function_exists('backpack_pro')) { |
|
319 | +if (!function_exists('backpack_pro')) { |
|
320 | 320 | /** |
321 | 321 | * Check if the backpack/pro package is installed. |
322 | 322 | * |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | if (app()->runningUnitTests()) { |
328 | 328 | return true; |
329 | 329 | } |
330 | - if (! \Composer\InstalledVersions::isInstalled('backpack/pro')) { |
|
330 | + if (!\Composer\InstalledVersions::isInstalled('backpack/pro')) { |
|
331 | 331 | return false; |
332 | 332 | } |
333 | 333 |