Passed
Push — master ( f0135a...2edfe9 )
by Andreas
06: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,14 +309,14 @@  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, `key`'))
314 314
                             ->pluck('rules', 'key')
315 315
                             ->toArray();
316 316
             });
317 317
         }
318 318
 
319
-        return Cache::rememberForever('settings.rules', function () {
319
+        return Cache::rememberForever('settings.rules', function() {
320 320
             return Setting::select(\DB::raw("printf('%s|%s', rules, type) as rules, `key`"))
321 321
                             ->pluck('rules', 'key')
322 322
                             ->toArray();
@@ -341,15 +341,15 @@  discard block
 block discarded – undo
341 341
     {
342 342
         parent::boot();
343 343
 
344
-        static::deleted(function () {
344
+        static::deleted(function() {
345 345
             self::flushCache();
346 346
             static::$all_settings = [];
347 347
         });
348
-        static::updated(function () {
348
+        static::updated(function() {
349 349
             self::flushCache();
350 350
             static::$all_settings = [];
351 351
         });
352
-        static::created(function () {
352
+        static::created(function() {
353 353
             self::flushCache();
354 354
             static::$all_settings = [];
355 355
         });
Please login to merge, or discard this patch.