@@ -38,11 +38,11 @@ discard block |
||
| 38 | 38 | { |
| 39 | 39 | if ($this->app->runningInConsole()) { |
| 40 | 40 | $this->publishes([ |
| 41 | - __DIR__.'/../config/temp_tag.php' => config_path('tag.php'), |
|
| 41 | + __DIR__ . '/../config/temp_tag.php' => config_path('tag.php'), |
|
| 42 | 42 | ], 'tag-config'); |
| 43 | 43 | |
| 44 | 44 | $this->publishes([ |
| 45 | - __DIR__.'/../database/migrations' => database_path('migrations'), |
|
| 45 | + __DIR__ . '/../database/migrations' => database_path('migrations'), |
|
| 46 | 46 | ], 'migrations'); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -52,14 +52,14 @@ discard block |
||
| 52 | 52 | private function registerMigrations() |
| 53 | 53 | { |
| 54 | 54 | if ($this->app->runningInConsole() && $this->shouldLoadDefaultMigrations()) { |
| 55 | - $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
|
| 55 | + $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | private function configure() |
| 60 | 60 | { |
| 61 | - if (! $this->app->configurationIsCached()) { |
|
| 62 | - $this->mergeConfigFrom(__DIR__.'/../config/temp_tag.php', 'tag'); |
|
| 61 | + if (!$this->app->configurationIsCached()) { |
|
| 62 | + $this->mergeConfigFrom(__DIR__ . '/../config/temp_tag.php', 'tag'); |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | public static function registerRelationship($q) |
| 72 | 72 | { |
| 73 | 73 | $table = $q->getModel()->getTable(); |
| 74 | - if (! in_array($table, TempTagServiceProvider::$registeredRelation)) { |
|
| 74 | + if (!in_array($table, TempTagServiceProvider::$registeredRelation)) { |
|
| 75 | 75 | TempTagServiceProvider::$registeredRelation[] = $table; |
| 76 | 76 | Relation::morphMap([$table => get_class($q->getModel())]); |
| 77 | 77 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | private function whereHasClosure($relation, $method) |
| 81 | 81 | { |
| 82 | - return function ($title, $payload = []) use ($relation, $method) { |
|
| 82 | + return function($title, $payload = []) use ($relation, $method) { |
|
| 83 | 83 | TempTagServiceProvider::registerRelationship($this); |
| 84 | 84 | |
| 85 | 85 | return $this->$method($relation, TempTagServiceProvider::getClosure($title, $payload)); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | public static function getClosure($title, $payload) |
| 90 | 90 | { |
| 91 | - return function ($q) use ($title, $payload) { |
|
| 91 | + return function($q) use ($title, $payload) { |
|
| 92 | 92 | if (is_string($title) && Str::contains($title, ['*'])) { |
| 93 | 93 | $title = str_replace('*', '%', $title); |
| 94 | 94 | $q->where('title', 'like', $title); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | foreach ($payload as $key => $value) { |
| 100 | - $q->where('payload->'.$key, $value); |
|
| 100 | + $q->where('payload->' . $key, $value); |
|
| 101 | 101 | } |
| 102 | 102 | }; |
| 103 | 103 | } |