1 | <?php declare(strict_types=1); |
||
8 | final class Session |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $id = ''; |
||
14 | |||
15 | /** |
||
16 | 10 | * @var array |
|
17 | */ |
||
18 | 10 | private $contents = []; |
|
19 | 10 | ||
20 | /** |
||
21 | * @var SessionIdInterface |
||
22 | */ |
||
23 | private $sessionId = []; |
||
24 | 2 | ||
25 | /** |
||
26 | 2 | * @var PHP_SESSION_NONE|PHP_SESSION_ACTIVE |
|
27 | 2 | */ |
|
28 | private $status = PHP_SESSION_NONE; |
||
29 | |||
30 | /** |
||
31 | * @param string $id |
||
32 | 10 | * @param array $contents |
|
33 | * @param SessionIdInterface $sessionId |
||
34 | 10 | */ |
|
35 | public function __construct(string $id, array $contents, SessionIdInterface $sessionId) |
||
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getId(): string |
||
53 | |||
54 | /** |
||
55 | * @param array $contents |
||
56 | */ |
||
57 | public function setContents(array $contents) |
||
61 | |||
62 | /** |
||
63 | * @return array |
||
64 | */ |
||
65 | public function getContents(): array |
||
69 | |||
70 | public function begin() |
||
82 | |||
83 | public function end() |
||
92 | |||
93 | /** |
||
94 | * @return bool |
||
95 | */ |
||
96 | public function isActive(): bool |
||
100 | |||
101 | public function regenerate() |
||
112 | } |
||
113 |
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..