Skip to content

Commit

Permalink
TASK: PhpStan level 5
Browse files Browse the repository at this point in the history
  • Loading branch information
mficzel committed Dec 28, 2024
1 parent aea163d commit 4dda134
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
7 changes: 0 additions & 7 deletions Classes/Aspects/ContentCacheAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ class ContentCacheAspect
{
private $hadUncachedSegments = false;

private $cacheTags = [];

/**
* @var null|int
*/
private $shortestLifetime = null;

/**
* @Flow\Inject
* @var StringFrontend
Expand Down
4 changes: 2 additions & 2 deletions Classes/Middleware/RequestCacheMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class RequestCacheMiddleware implements MiddlewareInterface
protected $ignoredCookieParams;

/**
* @var boolean
* @var int
* @Flow\InjectConfiguration(path="maxPublicCacheTime")
*/
protected $maxPublicCacheTime;
Expand All @@ -75,7 +75,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
$age = time() - $cacheEntry['timestamp'];
$response = Message::parseResponse($cacheEntry['response']);
return $response
->withHeader('Age', $age)
->withHeader('Age', (string)$age)
->withHeader(self::HEADER_INFO, 'HIT: ' . $entryIdentifier);
}

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"test:style": "phpcs --colors -n --standard=PSR12 Classes",
"test:stan": "phpstan analyse Classes",
"cc": "phpstan clear cache",
"fix": ["composer fix:style"],
"test": ["composer test:style" , "composer test:stan"]
},
"config": {
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
level: 5
paths:
- Classes
reportUnmatchedIgnoredErrors: false

0 comments on commit 4dda134

Please sign in to comment.