Test Failed
Push — master ( 64db43...4d1a57 )
by Andreas
03:02
created
src/Setting.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -114,11 +114,11 @@
 block discarded – undo
114 114
     }
115 115
 
116 116
     /**
117
-    * Check if setting exists
118
-    *
119
-    * @param $key
120
-    * @return bool
121
-    */
117
+     * Check if setting exists
118
+     *
119
+     * @param $key
120
+     * @return bool
121
+     */
122 122
     public static function has(string $key) : bool
123 123
     {
124 124
         return (boolean) isset(self::allSettings()[$key]);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      */
187 187
     public static function allSettings() : array
188 188
     {
189
-        return Cache::rememberForever('settings.all', function () {
189
+        return Cache::rememberForever('settings.all', function() {
190 190
             return $settings = self::all()->keyBy('key')->toArray();
191 191
 
192 192
             foreach ($settings as $setting) {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     public static function getValidationRules() : array
216 216
     {
217 217
         if ('mysql' === \DB::connection()->getPDO()->getAttribute(\PDO::ATTR_DRIVER_NAME)) {
218
-            return Cache::rememberForever('settings.rules', function () {
218
+            return Cache::rememberForever('settings.rules', function() {
219 219
                 return Setting::select(\DB::raw('concat(rules, "|", $type) as rules, key'))
220 220
                             ->pluck('rules', 'key')
221 221
                             ->toArray();
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         }
224 224
 
225 225
 
226
-        return Cache::rememberForever('settings.rules', function () {
226
+        return Cache::rememberForever('settings.rules', function() {
227 227
             return Setting::select(\DB::raw("printf('%s|%s', rules, type) as rules, key"))
228 228
                             ->pluck('rules', 'key')
229 229
                             ->toArray();
@@ -247,13 +247,13 @@  discard block
 block discarded – undo
247 247
     {
248 248
         parent::boot();
249 249
 
250
-        static::deleted(function () {
250
+        static::deleted(function() {
251 251
             self::flushCache();
252 252
         });
253
-        static::updated(function () {
253
+        static::updated(function() {
254 254
             self::flushCache();
255 255
         });
256
-        static::created(function () {
256
+        static::created(function() {
257 257
             self::flushCache();
258 258
         });
259 259
     }
Please login to merge, or discard this patch.
src/Utils/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use \Ottosmops\Settings\Setting;
4 4
 
5
-if (! function_exists('setting')) {
5
+if (!function_exists('setting')) {
6 6
     function setting($key, $default = null)
7 7
     {
8 8
         return Setting::getValue($key, $default);
Please login to merge, or discard this patch.
src/SettingsServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
             __DIR__ . '/../config/settings.php' => config_path('settings.php'),
13 13
         ], 'config');
14 14
 
15
-        if (! class_exists('CreateSettingsTable')) {
15
+        if (!class_exists('CreateSettingsTable')) {
16 16
             $this->publishes([
17
-                    __DIR__ . '/../database/migrations/create_settings_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()). '_create_settings_table.php')
17
+                    __DIR__ . '/../database/migrations/create_settings_table.php.stub' => database_path('migrations/' . date('Y_m_d_His', time()) . '_create_settings_table.php')
18 18
             ], 'migrations');
19 19
         }
20 20
     }
Please login to merge, or discard this patch.