Passed
Pull Request — master (#17)
by Iman
09:10 queued 06:35
created
src/TempTagServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
     {
40 40
         if ($this->app->runningInConsole()) {
41 41
             $this->publishes([
42
-                __DIR__.'/../config/temp_tag.php' => config_path('tag.php'),
42
+                __DIR__ . '/../config/temp_tag.php' => config_path('tag.php'),
43 43
             ], 'tag-config');
44 44
 
45 45
             $this->publishes([
46
-                __DIR__.'/../database/migrations' => database_path('migrations'),
46
+                __DIR__ . '/../database/migrations' => database_path('migrations'),
47 47
             ], 'migrations');
48 48
         }
49 49
 
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
     private function registerMigrations()
54 54
     {
55 55
         if ($this->app->runningInConsole() && $this->shouldLoadDefaultMigrations()) {
56
-            $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
56
+            $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
57 57
         }
58 58
     }
59 59
 
60 60
     private function configure()
61 61
     {
62
-        if (! $this->app->configurationIsCached()) {
63
-            $this->mergeConfigFrom(__DIR__.'/../config/temp_tag.php', 'tag');
62
+        if (!$this->app->configurationIsCached()) {
63
+            $this->mergeConfigFrom(__DIR__ . '/../config/temp_tag.php', 'tag');
64 64
         }
65 65
     }
66 66
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     public static function registerRelationship($q)
73 73
     {
74 74
         $table = $q->getModel()->getTable();
75
-        if (! in_array($table, TempTagServiceProvider::$registeredRelation)) {
75
+        if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
76 76
             TempTagServiceProvider::$registeredRelation[] = $table;
77 77
             Relation::morphMap([$table => get_class($q->getModel())]);
78 78
         }
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
 
81 81
     public static function getClosure($title, $payload)
82 82
     {
83
-        return function ($q) use ($title, $payload) {
83
+        return function($q) use ($title, $payload) {
84 84
             $q->whereIn('title', (array) $title);
85 85
             if ($payload) {
86
-                $q->where('payload->'.$payload[0], $payload[1]);
86
+                $q->where('payload->' . $payload[0], $payload[1]);
87 87
             }
88 88
         };
89 89
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
     private function whereHasClosure($relation)
107 107
     {
108
-        return function ($title, $payload) use ($relation) {
108
+        return function($title, $payload) use ($relation) {
109 109
             TempTagServiceProvider::registerRelationship($this);
110 110
 
111 111
             return $this->whereHas($relation, TempTagServiceProvider::getClosure($title, $payload));
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
     private function whereHasNotClosure($relation)
116 116
     {
117
-        return function ($title, $payload) use ($relation) {
117
+        return function($title, $payload) use ($relation) {
118 118
             TempTagServiceProvider::registerRelationship($this);
119 119
 
120 120
             return $this->whereDoesntHave($relation, TempTagServiceProvider::getClosure($title, $payload));
Please login to merge, or discard this patch.