Passed
Push — master ( eae648...d3d9cb )
by Iman
03:18
created
src/TempTagServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
     {
37 37
         if ($this->app->runningInConsole()) {
38 38
             $this->publishes([
39
-                __DIR__.'/../config/temp_tag.php' => config_path('tag.php'),
39
+                __DIR__ . '/../config/temp_tag.php' => config_path('tag.php'),
40 40
             ], 'tag-config');
41 41
 
42 42
             $this->publishes([
43
-                __DIR__.'/../database/migrations' => database_path('migrations'),
43
+                __DIR__ . '/../database/migrations' => database_path('migrations'),
44 44
             ], 'migrations');
45 45
         }
46 46
 
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
     private function registerMigrations()
51 51
     {
52 52
         if ($this->app->runningInConsole() && $this->shouldLoadDefaultMigrations()) {
53
-            $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
53
+            $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
54 54
         }
55 55
     }
56 56
 
57 57
     private function configure()
58 58
     {
59
-        if (! $this->app->configurationIsCached()) {
60
-            $this->mergeConfigFrom(__DIR__.'/../config/temp_tag.php', 'tag');
59
+        if (!$this->app->configurationIsCached()) {
60
+            $this->mergeConfigFrom(__DIR__ . '/../config/temp_tag.php', 'tag');
61 61
         }
62 62
     }
63 63
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public static function registerRelationship($q)
70 70
     {
71 71
         $table = $q->getModel()->getTable();
72
-        if (! in_array($table, TempTagServiceProvider::$registeredRelation)) {
72
+        if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
73 73
             TempTagServiceProvider::$registeredRelation[] = $table;
74 74
             Relation::morphMap([$table => get_class($q->getModel())]);
75 75
         }
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
 
78 78
     public static function getClosure($title, $payload)
79 79
     {
80
-        return function ($q) use ($title, $payload) {
80
+        return function($q) use ($title, $payload) {
81 81
             $q->whereIn('title', (array) $title);
82 82
             foreach ($payload as $key => $value) {
83
-                $q->where('payload->'.$key, $value);
83
+                $q->where('payload->' . $key, $value);
84 84
             }
85 85
         };
86 86
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
     private function whereHasClosure($relation)
101 101
     {
102
-        return function ($title, $payload) use ($relation) {
102
+        return function($title, $payload) use ($relation) {
103 103
             TempTagServiceProvider::registerRelationship($this);
104 104
 
105 105
             return $this->whereHas($relation, TempTagServiceProvider::getClosure($title, $payload));
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     private function whereHasNotClosure($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->whereDoesntHave($relation, TempTagServiceProvider::getClosure($title, $payload));
Please login to merge, or discard this patch.