Skip to content

Commit 4dda134

Browse files
committed
TASK: PhpStan level 5
1 parent aea163d commit 4dda134

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

Classes/Aspects/ContentCacheAspect.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ class ContentCacheAspect
1515
{
1616
private $hadUncachedSegments = false;
1717

18-
private $cacheTags = [];
19-
20-
/**
21-
* @var null|int
22-
*/
23-
private $shortestLifetime = null;
24-
2518
/**
2619
* @Flow\Inject
2720
* @var StringFrontend

Classes/Middleware/RequestCacheMiddleware.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class RequestCacheMiddleware implements MiddlewareInterface
5454
protected $ignoredCookieParams;
5555

5656
/**
57-
* @var boolean
57+
* @var int
5858
* @Flow\InjectConfiguration(path="maxPublicCacheTime")
5959
*/
6060
protected $maxPublicCacheTime;
@@ -75,7 +75,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
7575
$age = time() - $cacheEntry['timestamp'];
7676
$response = Message::parseResponse($cacheEntry['response']);
7777
return $response
78-
->withHeader('Age', $age)
78+
->withHeader('Age', (string)$age)
7979
->withHeader(self::HEADER_INFO, 'HIT: ' . $entryIdentifier);
8080
}
8181

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"test:style": "phpcs --colors -n --standard=PSR12 Classes",
2727
"test:stan": "phpstan analyse Classes",
2828
"cc": "phpstan clear cache",
29+
"fix": ["composer fix:style"],
2930
"test": ["composer test:style" , "composer test:stan"]
3031
},
3132
"config": {

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
parameters:
2+
level: 5
3+
paths:
4+
- Classes
5+
reportUnmatchedIgnoredErrors: false

0 commit comments

Comments
 (0)