Skip to content

Commit f354365

Browse files
committed
Remove redundant disabled-checks
1 parent 6c83564 commit f354365

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

src/CachedBuilder.php

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ class CachedBuilder extends EloquentBuilder
1212

1313
public function avg($column)
1414
{
15-
if (! $this->isCachable) {
16-
return parent::avg($column);
17-
}
18-
1915
$arguments = func_get_args();
2016
$cacheKey = $this->makeCacheKey(['*'], null, "-avg_{$column}");
2117
$method = 'avg';
@@ -25,10 +21,6 @@ public function avg($column)
2521

2622
public function count($columns = ['*'])
2723
{
28-
if (! $this->isCachable) {
29-
return parent::count($columns);
30-
}
31-
3224
$arguments = func_get_args();
3325
$cacheKey = $this->makeCacheKey(['*'], null, "-count");
3426
$method = 'count';
@@ -38,10 +30,6 @@ public function count($columns = ['*'])
3830

3931
public function cursor()
4032
{
41-
if (! $this->isCachable) {
42-
return collect(parent::cursor());
43-
}
44-
4533
$arguments = func_get_args();
4634
$cacheKey = $this->makeCacheKey(['*'], null, "-cursor");
4735
$method = 'cursor';
@@ -62,10 +50,6 @@ public function delete()
6250
*/
6351
public function find($id, $columns = ['*'])
6452
{
65-
if (! $this->isCachable) {
66-
return parent::find($id, $columns);
67-
}
68-
6953
$arguments = func_get_args();
7054
$cacheKey = $this->makeCacheKey($columns);
7155
$method = 'find';
@@ -75,10 +59,6 @@ public function find($id, $columns = ['*'])
7559

7660
public function first($columns = ['*'])
7761
{
78-
if (! $this->isCachable) {
79-
return parent::first($columns);
80-
}
81-
8262
$arguments = func_get_args();
8363
$cacheKey = $this->makeCacheKey($columns);
8464
$method = 'first';
@@ -88,10 +68,6 @@ public function first($columns = ['*'])
8868

8969
public function get($columns = ['*'])
9070
{
91-
if (! $this->isCachable) {
92-
return parent::get($columns);
93-
}
94-
9571
$arguments = func_get_args();
9672
$cacheKey = $this->makeCacheKey($columns);
9773
$method = 'get';
@@ -101,10 +77,6 @@ public function get($columns = ['*'])
10177

10278
public function max($column)
10379
{
104-
if (! $this->isCachable) {
105-
return parent::max($column);
106-
}
107-
10880
$arguments = func_get_args();
10981
$cacheKey = $this->makeCacheKey(['*'], null, "-max_{$column}");
11082
$method = 'max';
@@ -114,10 +86,6 @@ public function max($column)
11486

11587
public function min($column)
11688
{
117-
if (! $this->isCachable) {
118-
return parent::min($column);
119-
}
120-
12189
$arguments = func_get_args();
12290
$cacheKey = $this->makeCacheKey(['*'], null, "-min_{$column}");
12391
$method = 'min';
@@ -127,10 +95,6 @@ public function min($column)
12795

12896
public function pluck($column, $key = null)
12997
{
130-
if (! $this->isCachable) {
131-
return parent::pluck($column, $key);
132-
}
133-
13498
$keyDifferentiator = "-pluck_{$column}" . ($key ? "_{$key}" : "");
13599
$arguments = func_get_args();
136100
$cacheKey = $this->makeCacheKey([$column], null, $keyDifferentiator);
@@ -141,10 +105,6 @@ public function pluck($column, $key = null)
141105

142106
public function sum($column)
143107
{
144-
if (! $this->isCachable) {
145-
return parent::sum($column);
146-
}
147-
148108
$arguments = func_get_args();
149109
$cacheKey = $this->makeCacheKey(['*'], null, "-sum_{$column}");
150110
$method = 'sum';
@@ -154,10 +114,6 @@ public function sum($column)
154114

155115
public function value($column)
156116
{
157-
if (! $this->isCachable) {
158-
return parent::value($column);
159-
}
160-
161117
$arguments = func_get_args();
162118
$cacheKey = $this->makeCacheKey(['*'], null, "-value_{$column}");
163119
$method = 'value';

0 commit comments

Comments
 (0)