@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | { |
65 | 65 | if ($this->app->runningInConsole()) { |
66 | 66 | $this->publishes([ |
67 | - __DIR__.'/../config/temp_tag.php' => config_path('tag.php'), |
|
67 | + __DIR__ . '/../config/temp_tag.php' => config_path('tag.php'), |
|
68 | 68 | ], 'tag-config'); |
69 | 69 | |
70 | 70 | $this->publishes([ |
71 | - __DIR__.'/../database/migrations' => database_path('migrations'), |
|
71 | + __DIR__ . '/../database/migrations' => database_path('migrations'), |
|
72 | 72 | ], 'migrations'); |
73 | 73 | } |
74 | 74 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | private function registerMigrations() |
84 | 84 | { |
85 | 85 | if ($this->app->runningInConsole() && $this->shouldLoadDefaultMigrations()) { |
86 | - $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
|
86 | + $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); |
|
87 | 87 | } |
88 | 88 | } |
89 | 89 | |
@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | */ |
95 | 95 | private function configure() |
96 | 96 | { |
97 | - if (! $this->app->configurationIsCached()) { |
|
98 | - $this->mergeConfigFrom(__DIR__.'/../config/temp_tag.php', 'tag'); |
|
97 | + if (!$this->app->configurationIsCached()) { |
|
98 | + $this->mergeConfigFrom(__DIR__ . '/../config/temp_tag.php', 'tag'); |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | public static function registerRelationship($q) |
108 | 108 | { |
109 | 109 | $table = $q->getModel()->getTable(); |
110 | - if (! in_array($table, TempTagServiceProvider::$registeredRelation)) { |
|
110 | + if (!in_array($table, TempTagServiceProvider::$registeredRelation)) { |
|
111 | 111 | TempTagServiceProvider::$registeredRelation[] = $table; |
112 | 112 | Relation::morphMap([$table => get_class($q->getModel())]); |
113 | 113 | } |
@@ -115,44 +115,44 @@ discard block |
||
115 | 115 | |
116 | 116 | public static function getClosure($title): \Closure |
117 | 117 | { |
118 | - return function ($q) use ($title) { |
|
118 | + return function($q) use ($title) { |
|
119 | 119 | $q->whereIn('title', (array) $title); |
120 | 120 | }; |
121 | 121 | } |
122 | 122 | |
123 | 123 | private function registerEloquentMacros() |
124 | 124 | { |
125 | - Builder::macro('hasActiveTempTags', function ($title) { |
|
125 | + Builder::macro('hasActiveTempTags', function($title) { |
|
126 | 126 | TempTagServiceProvider::registerRelationship($this); |
127 | 127 | |
128 | 128 | return $this->whereHas('activeTempTags', TempTagServiceProvider::getClosure($title)); |
129 | 129 | }); |
130 | 130 | |
131 | - Builder::macro('hasNotActiveTempTags', function ($title) { |
|
131 | + Builder::macro('hasNotActiveTempTags', function($title) { |
|
132 | 132 | TempTagServiceProvider::registerRelationship($this); |
133 | 133 | |
134 | 134 | return $this->whereDoesntHave('activeTempTags', TempTagServiceProvider::getClosure($title)); |
135 | 135 | }); |
136 | 136 | |
137 | - Builder::macro('hasExpiredTempTags', function ($title) { |
|
137 | + Builder::macro('hasExpiredTempTags', function($title) { |
|
138 | 138 | TempTagServiceProvider::registerRelationship($this); |
139 | 139 | |
140 | 140 | return $this->whereHas('expiredTempTags', TempTagServiceProvider::getClosure($title)); |
141 | 141 | }); |
142 | 142 | |
143 | - Builder::macro('hasNotExpiredTempTags', function ($title) { |
|
143 | + Builder::macro('hasNotExpiredTempTags', function($title) { |
|
144 | 144 | TempTagServiceProvider::registerRelationship($this); |
145 | 145 | |
146 | 146 | return $this->whereDoesntHave('expiredTempTags', TempTagServiceProvider::getClosure($title)); |
147 | 147 | }); |
148 | 148 | |
149 | - Builder::macro('hasTempTags', function ($title) { |
|
149 | + Builder::macro('hasTempTags', function($title) { |
|
150 | 150 | TempTagServiceProvider::registerRelationship($this); |
151 | 151 | |
152 | 152 | return $this->whereHas('tempTags', TempTagServiceProvider::getClosure($title)); |
153 | 153 | }); |
154 | 154 | |
155 | - Builder::macro('hasNotTempTags', function ($title) { |
|
155 | + Builder::macro('hasNotTempTags', function($title) { |
|
156 | 156 | TempTagServiceProvider::registerRelationship($this); |
157 | 157 | |
158 | 158 | return $this->whereDoesntHave('tempTags', TempTagServiceProvider::getClosure($title)); |