Completed
Push — master ( 605762...f098ed )
by Vasyl
02:13
created
src/Models/SlugModelScopesTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
     public function scopeByTypesByNames($query, array $attributes)
8 8
     {
9 9
         foreach ($attributes as $type => $slugs) {
10
-            if (! empty($slugs)) {
10
+            if (!empty($slugs)) {
11 11
                 $names = is_array($slugs) ? $slugs : [$slugs];
12 12
                 $query->orWhere('slugable_type', $type)->whereIn('name', $names);
13 13
             }
Please login to merge, or discard this patch.
src/SlugMakerTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
      */
51 51
     protected static function bootSlugMakerTrait()
52 52
     {
53
-        static::created(function (Model $model) {
53
+        static::created(function(Model $model) {
54 54
             $model->generateSlugOnCreate();
55 55
         });
56 56
 
57
-        static::updated(function (Model $model) {
57
+        static::updated(function(Model $model) {
58 58
             $model->generateSlugOnUpdate();
59 59
         });
60 60
 
61
-        static::deleted(function (Model $model) {
61
+        static::deleted(function(Model $model) {
62 62
             $model->removeSlugsOnDeleted();
63 63
         });
64 64
     }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         $this->slugOptions = $this->getSlugMakerOptions();
82 82
 
83
-        if (! $this->slugOptions->generateSlugsOnCreate) {
83
+        if (!$this->slugOptions->generateSlugsOnCreate) {
84 84
             return;
85 85
         }
86 86
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $this->slugOptions = $this->getSlugMakerOptions();
97 97
 
98
-        if (! $this->slugOptions->generateSlugsOnUpdate) {
98
+        if (!$this->slugOptions->generateSlugsOnUpdate) {
99 99
             return;
100 100
         }
101 101
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         }
171 171
 
172 172
         $slugSourceString = collect($this->slugOptions->generateSlugFrom)
173
-            ->map(function (string $fieldName) : string {
173
+            ->map(function(string $fieldName) : string {
174 174
                 return $this->$fieldName ?? '';
175 175
             })
176 176
             ->implode('-');
@@ -208,11 +208,11 @@  discard block
 block discarded – undo
208 208
      */
209 209
     protected function guardAgainstInvalidSlugOptions()
210 210
     {
211
-        if (! count($this->slugOptions->generateSlugFrom)) {
211
+        if (!count($this->slugOptions->generateSlugFrom)) {
212 212
             throw InvalidOption::missingFromField();
213 213
         }
214 214
 
215
-        if (! strlen($this->slugField)) {
215
+        if (!strlen($this->slugField)) {
216 216
             throw InvalidOption::missingSlugField();
217 217
         }
218 218
 
Please login to merge, or discard this patch.