Passed
Push — master ( fe5f25...eb584c )
by Mehmet
07:17
created
src/SettingsBag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     # Apply the model's settings.
24 24
     public function apply(array $settings = []): self
25 25
     {
26
-        $this->model->settings = (array)$settings;
26
+        $this->model->settings = (array) $settings;
27 27
         $this->model->save();
28 28
 
29 29
         return $this;
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     # Determine if the model has the given setting.
39 39
     public function has(string $path): bool
40 40
     {
41
-        return (bool)Arr::has($this->all(), $path);
41
+        return (bool) Arr::has($this->all(), $path);
42 42
     }
43 43
 
44 44
     # Update the setting at given path to the given value.
Please login to merge, or discard this patch.
src/HasSettingsBag.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
     # Boot the HasSettingsBag trait.
11 11
     public static function bootHasSettingsBag(): void
12 12
     {
13
-        self::creating(function ($model) {
13
+        self::creating(function($model) {
14 14
             if (!$model->settings) {
15 15
                 $model->settings = $model->getDefaultSettings() ?: null;
16 16
             }
17 17
         });
18 18
 
19
-        self::saving(function ($model) {
19
+        self::saving(function($model) {
20 20
             if ($model->settings && property_exists($model, 'allowedSettings') && is_array($model->allowedSettings)) {
21 21
                 $model->settings = Arr::only($model->settings, $model->allowedSettings);
22 22
             }
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
             return new SettingsBag($this);
51 51
         }
52 52
 
53
-        $settingRelation = $settingName . 'SettingsBag';
53
+        $settingRelation = $settingName.'SettingsBag';
54 54
         if (!method_exists($this, $settingRelation) || !in_array(__TRAIT__, class_uses($this->{$settingRelation}))) {
55
-            throw new Exception($settingName . ' setting not available on ' . get_class($this) . ' model');
55
+            throw new Exception($settingName.' setting not available on '.get_class($this).' model');
56 56
         }
57 57
 
58 58
         $settingModel = $this->{$settingRelation};
Please login to merge, or discard this patch.