Passed
Push — master ( c33f6e...c08cc0 )
by Iman
02:53
created
src/TempTagServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
     public function register()
15 15
     {
16
-        config()->set('cache.stores.temp_tag', ['driver' => 'file', 'path' => storage_path('framework/temp_tag'),]);
16
+        config()->set('cache.stores.temp_tag', ['driver' => 'file', 'path' => storage_path('framework/temp_tag'), ]);
17 17
         $this->registerEloquentMacros();
18 18
         $this->registerConsoleCommands();
19 19
     }
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
     {
38 38
         if ($this->app->runningInConsole()) {
39 39
             $this->publishes([
40
-                __DIR__.'/../config/temp_tag.php' => config_path('tag.php'),
40
+                __DIR__ . '/../config/temp_tag.php' => config_path('tag.php'),
41 41
             ], 'tag-config');
42 42
 
43 43
             $this->publishes([
44
-                __DIR__.'/../database/migrations' => database_path('migrations'),
44
+                __DIR__ . '/../database/migrations' => database_path('migrations'),
45 45
             ], 'migrations');
46 46
         }
47 47
 
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
     private function registerMigrations()
52 52
     {
53 53
         if ($this->app->runningInConsole() && $this->shouldLoadDefaultMigrations()) {
54
-            $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
54
+            $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
55 55
         }
56 56
     }
57 57
 
58 58
     private function configure()
59 59
     {
60
-        if (! $this->app->configurationIsCached()) {
61
-            $this->mergeConfigFrom(__DIR__.'/../config/temp_tag.php', 'tag');
60
+        if (!$this->app->configurationIsCached()) {
61
+            $this->mergeConfigFrom(__DIR__ . '/../config/temp_tag.php', 'tag');
62 62
         }
63 63
     }
64 64
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     public static function registerRelationship($q)
71 71
     {
72 72
         $table = $q->getModel()->getTable();
73
-        if (! in_array($table, TempTagServiceProvider::$registeredRelation)) {
73
+        if (!in_array($table, TempTagServiceProvider::$registeredRelation)) {
74 74
             TempTagServiceProvider::$registeredRelation[] = $table;
75 75
             Relation::morphMap([$table => get_class($q->getModel())]);
76 76
         }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     private function whereHasClosure($relation, $method)
80 80
     {
81
-        return function ($title, $payload = []) use ($relation, $method) {
81
+        return function($title, $payload = []) use ($relation, $method) {
82 82
             TempTagServiceProvider::registerRelationship($this);
83 83
 
84 84
             return $this->$method($relation, TempTagServiceProvider::getClosure($title, $payload));
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
 
88 88
     public static function getClosure($title, $payload)
89 89
     {
90
-        return function ($q) use ($title, $payload) {
90
+        return function($q) use ($title, $payload) {
91 91
             $q->whereIn('title', (array) $title);
92 92
             foreach ($payload as $key => $value) {
93
-                $q->where('payload->'.$key, $value);
93
+                $q->where('payload->' . $key, $value);
94 94
             }
95 95
         };
96 96
     }
Please login to merge, or discard this patch.