@@ -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 | if ($setting->type === 'integer' && is_string($value) && ctype_digit($value)) { |
| 242 | 242 | $value = (int) $value; |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | */ |
| 275 | 275 | public static function allSettings() : array |
| 276 | 276 | { |
| 277 | - return Cache::rememberForever('settings.all', function () { |
|
| 277 | + return Cache::rememberForever('settings.all', function() { |
|
| 278 | 278 | return $settings = self::all()->keyBy('key')->toArray(); |
| 279 | 279 | }); |
| 280 | 280 | } |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | public static function getValidationRules() : array |
| 303 | 303 | { |
| 304 | 304 | if ('mysql' === \DB::connection()->getPDO()->getAttribute(\PDO::ATTR_DRIVER_NAME)) { |
| 305 | - return Cache::rememberForever('settings.rules', function () { |
|
| 305 | + return Cache::rememberForever('settings.rules', function() { |
|
| 306 | 306 | return Setting::select(\DB::raw('concat_ws("|", rules, type) as rules, `key`')) |
| 307 | 307 | ->pluck('rules', 'key') |
| 308 | 308 | ->toArray(); |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | |
| 313 | - return Cache::rememberForever('settings.rules', function () { |
|
| 313 | + return Cache::rememberForever('settings.rules', function() { |
|
| 314 | 314 | return Setting::select(\DB::raw("printf('%s|%s', rules, type) as rules, `key`")) |
| 315 | 315 | ->pluck('rules', 'key') |
| 316 | 316 | ->toArray(); |
@@ -335,13 +335,13 @@ discard block |
||
| 335 | 335 | { |
| 336 | 336 | parent::boot(); |
| 337 | 337 | |
| 338 | - static::deleted(function () { |
|
| 338 | + static::deleted(function() { |
|
| 339 | 339 | self::flushCache(); |
| 340 | 340 | }); |
| 341 | - static::updated(function () { |
|
| 341 | + static::updated(function() { |
|
| 342 | 342 | self::flushCache(); |
| 343 | 343 | }); |
| 344 | - static::created(function () { |
|
| 344 | + static::created(function() { |
|
| 345 | 345 | self::flushCache(); |
| 346 | 346 | }); |
| 347 | 347 | } |