| 1 | <?php |
||
| 7 | class CacheItem implements CacheItemInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $key; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var mixed |
||
| 16 | */ |
||
| 17 | protected $value; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var boolean |
||
| 21 | */ |
||
| 22 | protected $hit; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var \DateTime |
||
| 26 | */ |
||
| 27 | protected $expiration; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * CacheItem constructor. |
||
| 31 | * @param string $key |
||
| 32 | * @param mixed $value |
||
| 33 | * @param bool $hit |
||
| 34 | */ |
||
| 35 | public function __construct($key, $value, $hit = true) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * {@inheritdoc} |
||
| 45 | */ |
||
| 46 | public function getKey() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * {@inheritdoc} |
||
| 53 | */ |
||
| 54 | public function get() |
||
| 58 | /** |
||
| 59 | * {@inheritdoc} |
||
| 60 | */ |
||
| 61 | public function set($value = null) |
||
| 67 | /** |
||
| 68 | * {@inheritdoc} |
||
| 69 | */ |
||
| 70 | public function isHit() |
||
| 74 | /** |
||
| 75 | * {@inheritdoc} |
||
| 76 | */ |
||
| 77 | public function expiresAt($expiration) |
||
| 87 | /** |
||
| 88 | * {@inheritdoc} |
||
| 89 | */ |
||
| 90 | public function expiresAfter($time) |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @return \DateTime |
||
| 107 | */ |
||
| 108 | public function getExpiresAt() |
||
| 112 | |||
| 113 | public function getExpiresInSecs() |
||
| 117 | } |
||
| 118 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..