Passed
Branch master (794819)
by Vasyl
02:31
created
Category
src/SlugMakerTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
     protected static function bootSlugMakerTrait()
53 53
     {
54 54
 
55
-        static::created(function (Model $model) {
55
+        static::created(function(Model $model) {
56 56
             $model->generateSlugOnCreate();
57 57
         });
58 58
 
59
-        static::updated(function (Model $model) {
59
+        static::updated(function(Model $model) {
60 60
             $model->generateSlugOnUpdate();
61 61
         });
62 62
 
63
-        static::deleted(function (Model $model) {
63
+        static::deleted(function(Model $model) {
64 64
             $model->removeSlugsOnDeleted();
65 65
         });
66 66
     }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $this->slugOptions = $this->getSlugMakerOptions();
84 84
 
85
-        if (! $this->slugOptions->generateSlugsOnCreate) {
85
+        if (!$this->slugOptions->generateSlugsOnCreate) {
86 86
             return;
87 87
         }
88 88
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     {
98 98
         $this->slugOptions = $this->getSlugMakerOptions();
99 99
 
100
-        if (! $this->slugOptions->generateSlugsOnUpdate) {
100
+        if (!$this->slugOptions->generateSlugsOnUpdate) {
101 101
             return;
102 102
         }
103 103
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         }
172 172
 
173 173
         $slugSourceString = collect($this->slugOptions->generateSlugFrom)
174
-            ->map(function (string $fieldName) : string {
174
+            ->map(function(string $fieldName) : string {
175 175
                 return $this->$fieldName ?? '';
176 176
             })
177 177
             ->implode('-');
@@ -209,11 +209,11 @@  discard block
 block discarded – undo
209 209
      */
210 210
     protected function guardAgainstInvalidSlugOptions()
211 211
     {
212
-        if (! count($this->slugOptions->generateSlugFrom)) {
212
+        if (!count($this->slugOptions->generateSlugFrom)) {
213 213
             throw InvalidOption::missingFromField();
214 214
         }
215 215
 
216
-        if (! strlen($this->slugField)) {
216
+        if (!strlen($this->slugField)) {
217 217
             throw InvalidOption::missingSlugField();
218 218
         }
219 219
 
Please login to merge, or discard this patch.
src/SlugMakerServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
             __DIR__.'/../config/slugmaker.php' => $this->app->configPath().'/slugmaker.php',
14 14
         ], 'config');
15 15
 
16
-        if (! class_exists('CreateSlugsTable')) {
16
+        if (!class_exists('CreateSlugsTable')) {
17 17
             $timestamp = date('Y_m_d_His', time());
18 18
 
19 19
             $this->publishes([
Please login to merge, or discard this patch.