Passed
Push — master ( 2edfe9...864b1f )
by Andreas
05:12
created
src/Setting.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 $value = str_replace('ç€π', '\\', $value);
159 159
                 $value = str_replace('@ƻ', '/', $value);
160 160
             case 'string':
161
-                $value =  trim($value, '"');
161
+                $value = trim($value, '"');
162 162
             default:
163 163
                 return (string) $value;
164 164
         }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
         if ($setting->type === 'boolean' && is_string($value)) {
240 240
             $value = ($value === 'false') ? false : $value;
241
-            $value = ($value === 'true')  ? true  : $value;
241
+            $value = ($value === 'true') ? true  : $value;
242 242
         }
243 243
         if ($setting->type === 'integer' && is_string($value) && ctype_digit($value)) {
244 244
             $value = (int) $value;
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
      */
277 277
     public static function allSettings() : array
278 278
     {
279
-        if (! static::$all_settings) {
280
-            static::$all_settings = Cache::rememberForever('settings.all', function () {
279
+        if (!static::$all_settings) {
280
+            static::$all_settings = Cache::rememberForever('settings.all', function() {
281 281
                 return self::all()->keyBy('key')->toArray();
282 282
             });
283 283
         }
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
     public static function getValidationRules() : array
310 310
     {
311 311
         if ('mysql' === \DB::connection()->getPDO()->getAttribute(\PDO::ATTR_DRIVER_NAME)) {
312
-            return Cache::rememberForever('settings.rules', function () {
312
+            return Cache::rememberForever('settings.rules', function() {
313 313
                 return Setting::select(\DB::raw('concat_ws("|", rules, type) as rules'))
314 314
                             ->select('key')
315 315
                             ->get()
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             });
318 318
         }
319 319
 
320
-        return Cache::rememberForever('settings.rules', function () {
320
+        return Cache::rememberForever('settings.rules', function() {
321 321
             return Setting::select(\DB::raw("printf('%s|%s', rules, type) as rules, `key`"))
322 322
                             ->pluck('rules', 'key')
323 323
                             ->toArray();
@@ -342,15 +342,15 @@  discard block
 block discarded – undo
342 342
     {
343 343
         parent::boot();
344 344
 
345
-        static::deleted(function () {
345
+        static::deleted(function() {
346 346
             self::flushCache();
347 347
             static::$all_settings = [];
348 348
         });
349
-        static::updated(function () {
349
+        static::updated(function() {
350 350
             self::flushCache();
351 351
             static::$all_settings = [];
352 352
         });
353
-        static::created(function () {
353
+        static::created(function() {
354 354
             self::flushCache();
355 355
             static::$all_settings = [];
356 356
         });
Please login to merge, or discard this patch.