Skip to content

Commit 460fd39

Browse files
committed
Identations
1 parent 4be5937 commit 460fd39

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/Query/Builder.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ class Builder extends BaseBuilder implements QueryCacheModuleInterface
1515
*/
1616
public function get($columns = ['*'])
1717
{
18-
if (! $this->shouldAvoidCache()) {
19-
return $this->getFromQueryCache('get', $columns);
20-
}
21-
22-
return parent::get($columns);
18+
return $this->shouldAvoidCache()
19+
? parent::get($columns)
20+
: $this->getFromQueryCache('get', $columns);
2321
}
2422

2523
/**

src/Traits/QueryCacheable.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@ protected function newBaseQueryBuilder()
5757
$connection->getPostProcessor()
5858
);
5959

60-
if ($this->cacheFor) {
61-
$builder->cacheFor($this->cacheFor);
62-
} else {
63-
$builder->dontCache();
64-
}
60+
$this->cacheFor
61+
? $builder->cacheFor($this->cacheFor)
62+
: $builder->dontCache();
6563

6664
if ($this->cacheTags) {
6765
$builder->cacheTags($this->cacheTags);
@@ -79,8 +77,7 @@ protected function newBaseQueryBuilder()
7977
$builder->withPlainKey();
8078
}
8179

82-
return $builder
83-
->cacheBaseTags($this->getCacheBaseTags());
80+
return $builder->cacheBaseTags($this->getCacheBaseTags());
8481
}
8582

8683
/**

0 commit comments

Comments
 (0)