| 1 | <?php declare(strict_types=1); |
||
| 10 | class ModifiedSince |
||
| 11 | { |
||
| 12 | |||
| 13 | const HTTP_HEADER_NAME = 'If-Modified-Since'; |
||
| 14 | |||
| 15 | private $value; |
||
| 16 | |||
| 17 | private $logger; |
||
| 18 | |||
| 19 | 10 | public function __construct(RequestStack $requestStack, LoggerInterface $logger) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @return \DateTime |
||
| 27 | */ |
||
| 28 | 9 | public function getValue(): \DateTime |
|
| 32 | |||
| 33 | 10 | private function getModifiedSince(Request $request):\DateTime |
|
| 46 | |||
| 47 | } |
||
| 48 |
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: