@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $value = str_replace('ç€π', '\\', $value); |
157 | 157 | $value = str_replace('@ƻ', '/', $value); |
158 | 158 | case 'string': |
159 | - $value = trim($value, '"'); |
|
159 | + $value = trim($value, '"'); |
|
160 | 160 | default: |
161 | 161 | return (string) $value; |
162 | 162 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | |
237 | 237 | if ($setting->type === 'boolean' && is_string($value)) { |
238 | 238 | $value = ($value === 'false') ? false : $value; |
239 | - $value = ($value === 'true') ? true : $value; |
|
239 | + $value = ($value === 'true') ? true : $value; |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | if ($validate && !$setting->validateNewValue($value)) { |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | */ |
272 | 272 | public static function allSettings() : array |
273 | 273 | { |
274 | - return Cache::rememberForever('settings.all', function () { |
|
274 | + return Cache::rememberForever('settings.all', function() { |
|
275 | 275 | return $settings = self::all()->keyBy('key')->toArray(); |
276 | 276 | }); |
277 | 277 | } |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | public static function getValidationRules() : array |
300 | 300 | { |
301 | 301 | if ('mysql' === \DB::connection()->getPDO()->getAttribute(\PDO::ATTR_DRIVER_NAME)) { |
302 | - return Cache::rememberForever('settings.rules', function () { |
|
302 | + return Cache::rememberForever('settings.rules', function() { |
|
303 | 303 | return Setting::select(\DB::raw('concat_ws("|", rules, type) as rules, `key`')) |
304 | 304 | ->pluck('rules', 'key') |
305 | 305 | ->toArray(); |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | } |
308 | 308 | |
309 | 309 | |
310 | - return Cache::rememberForever('settings.rules', function () { |
|
310 | + return Cache::rememberForever('settings.rules', function() { |
|
311 | 311 | return Setting::select(\DB::raw("printf('%s|%s', rules, type) as rules, `key`")) |
312 | 312 | ->pluck('rules', 'key') |
313 | 313 | ->toArray(); |
@@ -332,13 +332,13 @@ discard block |
||
332 | 332 | { |
333 | 333 | parent::boot(); |
334 | 334 | |
335 | - static::deleted(function () { |
|
335 | + static::deleted(function() { |
|
336 | 336 | self::flushCache(); |
337 | 337 | }); |
338 | - static::updated(function () { |
|
338 | + static::updated(function() { |
|
339 | 339 | self::flushCache(); |
340 | 340 | }); |
341 | - static::created(function () { |
|
341 | + static::created(function() { |
|
342 | 342 | self::flushCache(); |
343 | 343 | }); |
344 | 344 | } |