Completed
Push — master ( 5fe85f...c42889 )
by Mike
02:51
created
src/Builder.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
         $cachedResults = $this->cache([$parentName, $childName])->rememberForever(
30 30
             "{$parentName}_{$parentIds}-{$childName}s",
31
-            function () use ($relation, $models, $name) {
31
+            function() use ($relation, $models, $name) {
32 32
                 return $relation->match(
33 33
                    $relation->initRelation($models, $name),
34 34
                    $relation->getEager(),
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
     public function find($id, $columns = ['*'])
56 56
     {
57 57
         $tag = str_slug(get_class($this->model));
58
-        $key = "{$tag}_{$id}_" . implode('_', $columns);
58
+        $key = "{$tag}_{$id}_".implode('_', $columns);
59 59
 
60 60
         return $this->cache([$tag])
61
-            ->rememberForever($key, function () use ($id, $columns) {
61
+            ->rememberForever($key, function() use ($id, $columns) {
62 62
                 return parent::find($id, $columns);
63 63
             });
64 64
     }
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
     public function count($columns = '*')
67 67
     {
68 68
         $tag = str_slug(get_class($this->model));
69
-        $key = "{$tag}_" . implode('_', $columns);
69
+        $key = "{$tag}_".implode('_', $columns);
70 70
 
71 71
         return $this->cache([$tag])
72
-            ->rememberForever($key, function () use ($id, $columns) {
72
+            ->rememberForever($key, function() use ($id, $columns) {
73 73
                 return parent::count($columns);
74 74
             });
75 75
     }
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
     public function first($columns = ['*'])
78 78
     {
79 79
         $tag = str_slug(get_class($this->model));
80
-        $key = "{$tag}_" . implode('_', $columns);
80
+        $key = "{$tag}_".implode('_', $columns);
81 81
 
82 82
         return $this->cache([$tag])
83
-            ->rememberForever($key, function () use ($id, $columns) {
83
+            ->rememberForever($key, function() use ($id, $columns) {
84 84
                 return parent::first($columns);
85 85
             });
86 86
     }
@@ -88,16 +88,16 @@  discard block
 block discarded – undo
88 88
     public function get($columns = ['*'])
89 89
     {
90 90
         $tag = str_slug(get_class($this->model));
91
-        $key = "{$tag}_" . implode('_', $columns);
92
-        $key .= collect($this->query->wheres)->reduce(function ($carry, $where) {
91
+        $key = "{$tag}_".implode('_', $columns);
92
+        $key .= collect($this->query->wheres)->reduce(function($carry, $where) {
93 93
             $value = $where['value'] ?? implode('_', $where['values']) ?? '';
94 94
 
95 95
             return "{$carry}-{$where['column']}_{$value}";
96 96
         });
97
-        $key .= '-' . implode('-', collect($this->eagerLoad)->keys()->toArray());
97
+        $key .= '-'.implode('-', collect($this->eagerLoad)->keys()->toArray());
98 98
 
99 99
         return $this->cache([$tag])
100
-            ->rememberForever($key, function () use ($columns) {
100
+            ->rememberForever($key, function() use ($columns) {
101 101
                 return parent::get($columns);
102 102
             });
103 103
     }
Please login to merge, or discard this patch.