Passed
Push — master ( 15730e...63f180 )
by Mike
21:33
created
src/CachedModel.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,19 +33,19 @@  discard block
 block discarded – undo
33 33
         $class = get_called_class();
34 34
         $instance = new $class;
35 35
 
36
-        static::created(function () use ($instance) {
36
+        static::created(function() use ($instance) {
37 37
             $instance->flushCache();
38 38
         });
39 39
 
40
-        static::deleted(function () use ($instance) {
40
+        static::deleted(function() use ($instance) {
41 41
             $instance->flushCache();
42 42
         });
43 43
 
44
-        static::saved(function () use ($instance) {
44
+        static::saved(function() use ($instance) {
45 45
             $instance->flushCache();
46 46
         });
47 47
 
48
-        static::updated(function () use ($instance) {
48
+        static::updated(function() use ($instance) {
49 49
             $instance->flushCache();
50 50
         });
51 51
     }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $key = $instance->makeCacheKey();
59 59
 
60 60
         return $instance->cache($tags)
61
-            ->rememberForever($key, function () use ($columns) {
61
+            ->rememberForever($key, function() use ($columns) {
62 62
                 return parent::all($columns);
63 63
             });
64 64
     }
Please login to merge, or discard this patch.
src/CachedBuilder.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function avg($column)
14 14
     {
15
-        if (! $this->isCachable) {
15
+        if (!$this->isCachable) {
16 16
             return parent::avg($column);
17 17
         }
18 18
 
19 19
         return $this->cache($this->makeCacheTags())
20 20
             ->rememberForever(
21 21
                 $this->makeCacheKey(['*'], null, "-avg_{$column}"),
22
-                function () use ($column) {
22
+                function() use ($column) {
23 23
                     return parent::avg($column);
24 24
                 }
25 25
             );
@@ -27,14 +27,14 @@  discard block
 block discarded – undo
27 27
 
28 28
     public function count($columns = ['*'])
29 29
     {
30
-        if (! $this->isCachable) {
30
+        if (!$this->isCachable) {
31 31
             return parent::count($columns);
32 32
         }
33 33
 
34 34
         return $this->cache($this->makeCacheTags())
35 35
             ->rememberForever(
36 36
                 $this->makeCacheKey(['*'], null, "-count"),
37
-                function () use ($columns) {
37
+                function() use ($columns) {
38 38
                     return parent::count($columns);
39 39
                 }
40 40
             );
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function cursor()
44 44
     {
45
-        if (! $this->isCachable) {
45
+        if (!$this->isCachable) {
46 46
             return collect(parent::cursor());
47 47
         }
48 48
 
49 49
         return $this->cache($this->makeCacheTags())
50 50
             ->rememberForever(
51 51
                 $this->makeCacheKey(['*'], null, "-cursor"),
52
-                function () {
52
+                function() {
53 53
                     return collect(parent::cursor());
54 54
                 }
55 55
             );
@@ -68,14 +68,14 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function find($id, $columns = ['*'])
70 70
     {
71
-        if (! $this->isCachable) {
71
+        if (!$this->isCachable) {
72 72
             return parent::find($id, $columns);
73 73
         }
74 74
 
75 75
         return $this->cache($this->makeCacheTags())
76 76
             ->rememberForever(
77 77
                 $this->makeCacheKey($columns, $id),
78
-                function () use ($id, $columns) {
78
+                function() use ($id, $columns) {
79 79
                     return parent::find($id, $columns);
80 80
                 }
81 81
             );
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
 
84 84
     public function first($columns = ['*'])
85 85
     {
86
-        if (! $this->isCachable) {
86
+        if (!$this->isCachable) {
87 87
             return parent::first($columns);
88 88
         }
89 89
 
90 90
         return $this->cache($this->makeCacheTags())
91 91
             ->rememberForever(
92 92
                 $this->makeCacheKey($columns, null, '-first'),
93
-                function () use ($columns) {
93
+                function() use ($columns) {
94 94
                     return parent::first($columns);
95 95
                 }
96 96
             );
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
 
99 99
     public function get($columns = ['*'])
100 100
     {
101
-        if (! $this->isCachable) {
101
+        if (!$this->isCachable) {
102 102
             return parent::get($columns);
103 103
         }
104 104
 
105 105
         return $this->cache($this->makeCacheTags())
106 106
             ->rememberForever(
107 107
                 $this->makeCacheKey($columns),
108
-                function () use ($columns) {
108
+                function() use ($columns) {
109 109
                     return parent::get($columns);
110 110
                 }
111 111
             );
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
 
114 114
     public function max($column)
115 115
     {
116
-        if (! $this->isCachable) {
116
+        if (!$this->isCachable) {
117 117
             return parent::max($column);
118 118
         }
119 119
 
120 120
         return $this->cache($this->makeCacheTags())
121 121
             ->rememberForever(
122 122
                 $this->makeCacheKey(['*'], null, "-max_{$column}"),
123
-                function () use ($column) {
123
+                function() use ($column) {
124 124
                     return parent::max($column);
125 125
                 }
126 126
             );
@@ -128,14 +128,14 @@  discard block
 block discarded – undo
128 128
 
129 129
     public function min($column)
130 130
     {
131
-        if (! $this->isCachable) {
131
+        if (!$this->isCachable) {
132 132
             return parent::min($column);
133 133
         }
134 134
 
135 135
         return $this->cache($this->makeCacheTags())
136 136
             ->rememberForever(
137 137
                 $this->makeCacheKey(['*'], null, "-min_{$column}"),
138
-                function () use ($column) {
138
+                function() use ($column) {
139 139
                     return parent::min($column);
140 140
                 }
141 141
             );
@@ -143,29 +143,29 @@  discard block
 block discarded – undo
143 143
 
144 144
     public function pluck($column, $key = null)
145 145
     {
146
-        if (! $this->isCachable) {
146
+        if (!$this->isCachable) {
147 147
             return parent::pluck($column, $key);
148 148
         }
149 149
 
150
-        $keyDifferentiator = "-pluck_{$column}" . ($key ? "_{$key}" : "");
150
+        $keyDifferentiator = "-pluck_{$column}".($key ? "_{$key}" : "");
151 151
         $cacheKey = $this->makeCacheKey([$column], null, $keyDifferentiator);
152 152
 
153 153
         return $this->cache($this->makeCacheTags())
154
-            ->rememberForever($cacheKey, function () use ($column, $key) {
154
+            ->rememberForever($cacheKey, function() use ($column, $key) {
155 155
                 return parent::pluck($column, $key);
156 156
             });
157 157
     }
158 158
 
159 159
     public function sum($column)
160 160
     {
161
-        if (! $this->isCachable) {
161
+        if (!$this->isCachable) {
162 162
             return parent::sum($column);
163 163
         }
164 164
 
165 165
         return $this->cache($this->makeCacheTags())
166 166
             ->rememberForever(
167 167
                 $this->makeCacheKey(['*'], null, "-sum_{$column}"),
168
-                function () use ($column) {
168
+                function() use ($column) {
169 169
                     return parent::sum($column);
170 170
                 }
171 171
             );
@@ -173,14 +173,14 @@  discard block
 block discarded – undo
173 173
 
174 174
     public function value($column)
175 175
     {
176
-        if (! $this->isCachable) {
176
+        if (!$this->isCachable) {
177 177
             return parent::value($column);
178 178
         }
179 179
 
180 180
         return $this->cache($this->makeCacheTags())
181 181
             ->rememberForever(
182 182
                 $this->makeCacheKey(['*'], null, "-value_{$column}"),
183
-                function () use ($column) {
183
+                function() use ($column) {
184 184
                     return parent::value($column);
185 185
                 }
186 186
             );
Please login to merge, or discard this patch.