Passed
Push — master ( b2f52c...843f0b )
by Iman
04:09
created
src/TempTagServiceProvider.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -23,84 +23,84 @@  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
-            if (! in_array($table, TempTagServiceProvider::$registeredRelation)) {
28
+            if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
29 29
                 TempTagServiceProvider::$registeredRelation[] = $table;
30 30
                 Relation::morphMap([
31 31
                     $table => get_class($this->getModel()),
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('hasNotActiveTempTags', function ($title) {
40
+        Builder::macro('hasNotActiveTempTags', function($title) {
41 41
             $table = $this->getModel()->getTable();
42
-            if (! in_array($table, TempTagServiceProvider::$registeredRelation)) {
42
+            if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
43 43
                 TempTagServiceProvider::$registeredRelation[] = $table;
44 44
                 Relation::morphMap([
45 45
                     $table => get_class($this->getModel()),
46 46
                 ]);
47 47
             }
48 48
 
49
-            return $this->whereDoesntHave('activeTempTags', function ($q) use ($title) {
49
+            return $this->whereDoesntHave('activeTempTags', function($q) use ($title) {
50 50
                 $q->whereIn('title', (array) $title);
51 51
             });
52 52
         });
53 53
 
54
-        Builder::macro('hasExpiredTempTags', function ($title) {
54
+        Builder::macro('hasExpiredTempTags', function($title) {
55 55
             $table = $this->getModel()->getTable();
56
-            if (! in_array($table, TempTagServiceProvider::$registeredRelation)) {
56
+            if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
57 57
                 TempTagServiceProvider::$registeredRelation[] = $table;
58 58
                 Relation::morphMap([
59 59
                     $table => get_class($this->getModel()),
60 60
                 ]);
61 61
             }
62 62
 
63
-            return $this->whereHas('expiredTempTags', function ($q) use ($title) {
63
+            return $this->whereHas('expiredTempTags', function($q) use ($title) {
64 64
                 $q->whereIn('title', (array) $title);
65 65
             });
66 66
         });
67 67
 
68
-        Builder::macro('hasNotExpiredTempTags', function ($title) {
68
+        Builder::macro('hasNotExpiredTempTags', function($title) {
69 69
             $table = $this->getModel()->getTable();
70
-            if (! in_array($table, TempTagServiceProvider::$registeredRelation)) {
70
+            if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
71 71
                 TempTagServiceProvider::$registeredRelation[] = $table;
72 72
                 Relation::morphMap([
73 73
                     $table => get_class($this->getModel()),
74 74
                 ]);
75 75
             }
76 76
 
77
-            return $this->whereDoesntHave('expiredTempTags', function ($q) use ($title) {
77
+            return $this->whereDoesntHave('expiredTempTags', function($q) use ($title) {
78 78
                 $q->whereIn('title', (array) $title);
79 79
             });
80 80
         });
81 81
 
82
-        Builder::macro('hasTempTags', function ($title) {
82
+        Builder::macro('hasTempTags', function($title) {
83 83
             $table = $this->getModel()->getTable();
84
-            if (! in_array($table, TempTagServiceProvider::$registeredRelation)) {
84
+            if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
85 85
                 TempTagServiceProvider::$registeredRelation[] = $table;
86 86
 
87 87
                 Relation::morphMap([$table => get_class($this->getModel())]);
88 88
             }
89 89
 
90
-            return $this->whereHas('tempTags', function ($q) use ($title) {
90
+            return $this->whereHas('tempTags', function($q) use ($title) {
91 91
                 $q->whereIn('title', (array) $title);
92 92
             });
93 93
         });
94 94
 
95
-        Builder::macro('hasNotTempTags', function ($title) {
95
+        Builder::macro('hasNotTempTags', function($title) {
96 96
             $table = $this->getModel()->getTable();
97
-            if (! in_array($table, TempTagServiceProvider::$registeredRelation)) {
97
+            if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
98 98
                 TempTagServiceProvider::$registeredRelation[] = $table;
99 99
 
100 100
                 Relation::morphMap([$table => get_class($this->getModel())]);
101 101
             }
102 102
 
103
-            return $this->whereDoesntHave('tempTags', function ($q) use ($title) {
103
+            return $this->whereDoesntHave('tempTags', function($q) use ($title) {
104 104
                 $q->whereIn('title', (array) $title);
105 105
             });
106 106
         });
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
     {
159 159
         if ($this->app->runningInConsole()) {
160 160
             $this->publishes([
161
-                __DIR__.'/../config/temp_tag.php' => config_path('tag.php'),
161
+                __DIR__ . '/../config/temp_tag.php' => config_path('tag.php'),
162 162
             ], 'tag-config');
163 163
 
164 164
             $this->publishes([
165
-                __DIR__.'/../database/migrations' => database_path('migrations'),
165
+                __DIR__ . '/../database/migrations' => database_path('migrations'),
166 166
             ], 'migrations');
167 167
         }
168 168
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     private function registerMigrations(): void
178 178
     {
179 179
         if ($this->app->runningInConsole() && $this->shouldLoadDefaultMigrations()) {
180
-            $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
180
+            $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
181 181
         }
182 182
     }
183 183
 
@@ -188,8 +188,8 @@  discard block
 block discarded – undo
188 188
      */
189 189
     private function configure(): void
190 190
     {
191
-        if (! $this->app->configurationIsCached()) {
192
-            $this->mergeConfigFrom(__DIR__.'/../config/temp_tag.php', 'tag');
191
+        if (!$this->app->configurationIsCached()) {
192
+            $this->mergeConfigFrom(__DIR__ . '/../config/temp_tag.php', 'tag');
193 193
         }
194 194
     }
195 195
 
Please login to merge, or discard this patch.