@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | { |
42 | 42 | if ($this->app->runningInConsole()) { |
43 | 43 | $this->publishes([ |
44 | - __DIR__.'/../config/temp_tag.php' => config_path('tag.php'), |
|
44 | + __DIR__ . '/../config/temp_tag.php' => config_path('tag.php'), |
|
45 | 45 | ], 'tag-config'); |
46 | 46 | |
47 | 47 | $this->publishes([ |
48 | - __DIR__.'/../database/migrations' => database_path('migrations'), |
|
48 | + __DIR__ . '/../database/migrations' => database_path('migrations'), |
|
49 | 49 | ], 'migrations'); |
50 | 50 | } |
51 | 51 | |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | private function registerMigrations() |
56 | 56 | { |
57 | 57 | if ($this->app->runningInConsole() && $this->shouldLoadDefaultMigrations()) { |
58 | - $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
|
58 | + $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | |
62 | 62 | private function configure() |
63 | 63 | { |
64 | - if (! $this->app->configurationIsCached()) { |
|
65 | - $this->mergeConfigFrom(__DIR__.'/../config/temp_tag.php', 'tag'); |
|
64 | + if (!$this->app->configurationIsCached()) { |
|
65 | + $this->mergeConfigFrom(__DIR__ . '/../config/temp_tag.php', 'tag'); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | public static function registerRelationship($q) |
75 | 75 | { |
76 | 76 | $table = $q->getModel()->getTable(); |
77 | - if (! in_array($table, TempTagServiceProvider::$registeredRelation)) { |
|
77 | + if (!in_array($table, TempTagServiceProvider::$registeredRelation)) { |
|
78 | 78 | TempTagServiceProvider::$registeredRelation[] = $table; |
79 | 79 | Relation::morphMap([$table => get_class($q->getModel())]); |
80 | 80 | } |
@@ -82,10 +82,10 @@ discard block |
||
82 | 82 | |
83 | 83 | public static function getClosure($title, $payload): \Closure |
84 | 84 | { |
85 | - return function ($q) use ($title, $payload) { |
|
85 | + return function($q) use ($title, $payload) { |
|
86 | 86 | $q->whereIn('title', (array) $title); |
87 | 87 | if ($payload) { |
88 | - $q->where('payload->'.$payload[0], $payload[1]); |
|
88 | + $q->where('payload->' . $payload[0], $payload[1]); |
|
89 | 89 | } |
90 | 90 | }; |
91 | 91 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | private function whereHasClosure($relation) |
109 | 109 | { |
110 | - return function ($title, $payload) use ($relation) { |
|
110 | + return function($title, $payload) use ($relation) { |
|
111 | 111 | TempTagServiceProvider::registerRelationship($this); |
112 | 112 | |
113 | 113 | return $this->whereHas($relation, TempTagServiceProvider::getClosure($title, $payload)); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | private function whereHasNotClosure($relation): \Closure |
118 | 118 | { |
119 | - return function ($title, $payload) use ($relation) { |
|
119 | + return function($title, $payload) use ($relation) { |
|
120 | 120 | TempTagServiceProvider::registerRelationship($this); |
121 | 121 | |
122 | 122 | return $this->whereDoesntHave($relation, TempTagServiceProvider::getClosure($title, $payload)); |