Skip to content

Commit c547d28

Browse files
committed
Style fixes
1 parent eef8c86 commit c547d28

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/CachePlugin.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function handleRequest(RequestInterface $request, callable $next, callabl
139139
if ($cacheItem->isHit()) {
140140
$data = $cacheItem->get();
141141
// The array_key_exists() is to be removed in 2.0.
142-
if (array_key_exists('expiresAt', $data) && ($data['expiresAt'] === null || time() < $data['expiresAt'])) {
142+
if (array_key_exists('expiresAt', $data) && (null === $data['expiresAt'] || time() < $data['expiresAt'])) {
143143
// This item is still valid according to previous cache headers
144144
return new FulfilledPromise($this->createResponseFromCacheItem($cacheItem));
145145
}
@@ -210,7 +210,7 @@ public function handleRequest(RequestInterface $request, callable $next, callabl
210210
*/
211211
private function calculateCacheItemExpiresAfter($maxAge)
212212
{
213-
if ($this->config['cache_lifetime'] === null && $maxAge === null) {
213+
if (null === $this->config['cache_lifetime'] && null === $maxAge) {
214214
return;
215215
}
216216

@@ -227,7 +227,7 @@ private function calculateCacheItemExpiresAfter($maxAge)
227227
*/
228228
private function calculateResponseExpiresAt($maxAge)
229229
{
230-
if ($maxAge === null) {
230+
if (null === $maxAge) {
231231
return;
232232
}
233233

0 commit comments

Comments
 (0)