Passed
Push — master ( 175b60...bdd198 )
by Iman
02:39
created
src/TempTagServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
     {
43 43
         if ($this->app->runningInConsole()) {
44 44
             $this->publishes([
45
-                __DIR__.'/../config/temp_tag.php' => config_path('tag.php'),
45
+                __DIR__ . '/../config/temp_tag.php' => config_path('tag.php'),
46 46
             ], 'tag-config');
47 47
 
48 48
             $this->publishes([
49
-                __DIR__.'/../database/migrations' => database_path('migrations'),
49
+                __DIR__ . '/../database/migrations' => database_path('migrations'),
50 50
             ], 'migrations');
51 51
         }
52 52
 
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
     private function registerMigrations()
57 57
     {
58 58
         if ($this->app->runningInConsole() && $this->shouldLoadDefaultMigrations()) {
59
-            $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
59
+            $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
60 60
         }
61 61
     }
62 62
 
63 63
     private function configure()
64 64
     {
65
-        if (! $this->app->configurationIsCached()) {
66
-            $this->mergeConfigFrom(__DIR__.'/../config/temp_tag.php', 'tag');
65
+        if (!$this->app->configurationIsCached()) {
66
+            $this->mergeConfigFrom(__DIR__ . '/../config/temp_tag.php', 'tag');
67 67
         }
68 68
     }
69 69
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     static function registerRelationship($q)
76 76
     {
77 77
         $table = $q->getModel()->getTable();
78
-        if (! in_array($table, TempTagServiceProvider::$registeredRelation)) {
78
+        if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
79 79
             TempTagServiceProvider::$registeredRelation[] = $table;
80 80
             Relation::morphMap([$table => get_class($q->getModel())]);
81 81
         }
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
 
84 84
     static function getClosure($title, $payload): \Closure
85 85
     {
86
-        return function ($q) use ($title, $payload) {
86
+        return function($q) use ($title, $payload) {
87 87
             $q->whereIn('title', (array) $title);
88 88
             if ($payload) {
89
-                $q->where('payload->'.$payload[0], $payload[1]);
89
+                $q->where('payload->' . $payload[0], $payload[1]);
90 90
             }
91 91
         };
92 92
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     private function whereHasClosure($relation)
110 110
     {
111
-        return function ($title, $payload) use($relation) {
111
+        return function($title, $payload) use($relation) {
112 112
             TempTagServiceProvider::registerRelationship($this);
113 113
 
114 114
             return $this->whereHas($relation, TempTagServiceProvider::getClosure($title, $payload));
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
     private function whereHasNotClosure($relation): \Closure
119 119
     {
120
-        return function ($title, $payload) use($relation) {
120
+        return function($title, $payload) use($relation) {
121 121
             TempTagServiceProvider::registerRelationship($this);
122 122
 
123 123
             return $this->whereDoesntHave($relation, TempTagServiceProvider::getClosure($title, $payload));
Please login to merge, or discard this patch.