Passed
Pull Request — master (#3)
by Iman
06:20 queued 03:01
created
src/TempTagServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     {
24 24
         $this->registerConsoleCommands();
25 25
 
26
-        Builder::macro('hasActiveTempTags', function ($title) {
26
+        Builder::macro('hasActiveTempTags', function($title) {
27 27
             $table = $this->getModel()->getTable();
28 28
             if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
29 29
                 TempTagServiceProvider::$registeredRelation[] = $table;
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
                 ]);
33 33
             }
34 34
 
35
-            return $this->whereHas('activeTempTags', function ($q) use ($title) {
35
+            return $this->whereHas('activeTempTags', function($q) use ($title) {
36 36
                 $q->whereIn('title', (array) $title);
37 37
             });
38 38
         });
39 39
 
40
-        Builder::macro('hasExpiredTempTags', function ($title) {
40
+        Builder::macro('hasExpiredTempTags', function($title) {
41 41
             $table = $this->getModel()->getTable();
42 42
             if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
43 43
                 TempTagServiceProvider::$registeredRelation[] = $table;
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
                 ]);
47 47
             }
48 48
 
49
-            return $this->whereHas('expiredTempTags', function ($q) use ($title) {
49
+            return $this->whereHas('expiredTempTags', function($q) use ($title) {
50 50
                 $q->whereIn('title', (array) $title);
51 51
             });
52 52
         });
53 53
 
54
-        Builder::macro('hasTempTags', function ($title) {
54
+        Builder::macro('hasTempTags', function($title) {
55 55
             $table = $this->getModel()->getTable();
56 56
             if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
57 57
                 TempTagServiceProvider::$registeredRelation[] = $table;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                 Relation::morphMap([$table => get_class($this->getModel())]);
60 60
             }
61 61
 
62
-            return $this->whereHas('tempTags', function ($q) use ($title) {
62
+            return $this->whereHas('tempTags', function($q) use ($title) {
63 63
                 $q->whereIn('title', (array) $title);
64 64
             });
65 65
         });
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
     {
118 118
         if ($this->app->runningInConsole()) {
119 119
             $this->publishes([
120
-                __DIR__.'/../config/temp_tag.php' => config_path('tag.php'),
120
+                __DIR__ . '/../config/temp_tag.php' => config_path('tag.php'),
121 121
             ], 'tag-config');
122 122
 
123 123
             $this->publishes([
124
-                __DIR__.'/../database/migrations' => database_path('migrations'),
124
+                __DIR__ . '/../database/migrations' => database_path('migrations'),
125 125
             ], 'migrations');
126 126
         }
127 127
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     private function registerMigrations(): void
137 137
     {
138 138
         if ($this->app->runningInConsole() && $this->shouldLoadDefaultMigrations()) {
139
-            $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
139
+            $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
140 140
         }
141 141
     }
142 142
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     private function configure(): void
149 149
     {
150 150
         if (!$this->app->configurationIsCached()) {
151
-            $this->mergeConfigFrom(__DIR__.'/../config/temp_tag.php', 'tag');
151
+            $this->mergeConfigFrom(__DIR__ . '/../config/temp_tag.php', 'tag');
152 152
         }
153 153
     }
154 154
 
Please login to merge, or discard this patch.
src/Services/TagService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         !$event && $event = 'tmp_tagged';
124 124
 
125
-        $event .= ':'.$this->model->getTable().','.$tag->title;
125
+        $event .= ':' . $this->model->getTable() . ',' . $tag->title;
126 126
 
127 127
         event($event, [$this->model, $tag]);
128 128
     }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
     private function deleteAll($tags)
143 143
     {
144
-        $tags->each(function ($tag) {
144
+        $tags->each(function($tag) {
145 145
             $tag->delete();
146 146
         });
147 147
     }
Please login to merge, or discard this patch.