1 | <?php declare(strict_types=1); |
||
9 | class ModifiedSince |
||
10 | { |
||
11 | |||
12 | const HTTP_HEADER_NAME = 'If-Modified-Since'; |
||
13 | |||
14 | private $value; |
||
15 | |||
16 | 7 | public function __construct(RequestStack $requestStack) |
|
20 | |||
21 | /** |
||
22 | * @return \DateTime |
||
23 | */ |
||
24 | 6 | public function getValue(): \DateTime |
|
28 | |||
29 | 7 | private function getModifiedSince(Request $request):\DateTime |
|
38 | } |
||
39 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: