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