Skip to content

Commit 8815e67

Browse files
committed
Code style
1 parent 065f847 commit 8815e67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/CachePlugin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class CachePlugin implements Plugin
3838
* @param CacheItemPoolInterface $pool
3939
* @param array $options
4040
*/
41-
public function __construct(CacheItemPoolInterface $pool, array $options = array())
41+
public function __construct(CacheItemPoolInterface $pool, array $options = [])
4242
{
4343
$this->pool = $pool;
4444
$this->defaultTtl = isset($options['default_ttl']) ? $options['default_ttl'] : null;
@@ -86,7 +86,7 @@ public function handleRequest(RequestInterface $request, callable $next, callabl
8686
*/
8787
protected function isCacheable(ResponseInterface $response)
8888
{
89-
if (!in_array($response->getStatusCode(), array(200, 203, 300, 301, 302, 404, 410))) {
89+
if (!in_array($response->getStatusCode(), [200, 203, 300, 301, 302, 404, 410])) {
9090
return false;
9191
}
9292
if ($this->getCacheControlDirective($response, 'no-store') || $this->getCacheControlDirective($response, 'private')) {
@@ -151,7 +151,7 @@ private function getMaxAge(ResponseInterface $response)
151151
if (!is_bool($maxAge)) {
152152
$ageHeaders = $response->getHeader('Age');
153153
foreach ($ageHeaders as $age) {
154-
return $maxAge-((int) $age);
154+
return $maxAge - ((int) $age);
155155
}
156156

157157
return $maxAge;

0 commit comments

Comments
 (0)