1 | <?php |
||
23 | class FixedList extends AbstractList |
||
24 | { |
||
25 | /** |
||
26 | * @var ValueType[] |
||
27 | */ |
||
28 | protected $data; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | protected $pointer = 0; |
||
34 | |||
35 | 37 | public function __construct(int $size = 0) |
|
39 | |||
40 | /** |
||
41 | * {@inheritDoc} |
||
42 | */ |
||
43 | 34 | public function add($item) |
|
47 | |||
48 | /** |
||
49 | * {@inheritDoc} |
||
50 | */ |
||
51 | 10 | public function get(int $index) |
|
55 | |||
56 | /** |
||
57 | * {@inheritDoc} |
||
58 | */ |
||
59 | public function splice |
||
73 | |||
74 | /** |
||
75 | * {@inheritDoc} |
||
76 | */ |
||
77 | 2 | public function set(int $index, $value) |
|
81 | |||
82 | /** |
||
83 | * {@inheritDoc} |
||
84 | */ |
||
85 | 1 | public function remove(int $item) |
|
89 | |||
90 | /** |
||
91 | * {@inheritDoc} |
||
92 | */ |
||
93 | 17 | public function getIterator() |
|
97 | |||
98 | /** |
||
99 | * {@inheritDoc} |
||
100 | */ |
||
101 | 6 | public function size() : int |
|
105 | |||
106 | /** |
||
107 | * Resizes the FixedList, throwing away any unused elements |
||
108 | * |
||
109 | * @param int $size The new size |
||
110 | */ |
||
111 | 31 | public function resize(int $size) |
|
115 | |||
116 | /** |
||
117 | * Returns the current pointer position |
||
118 | * |
||
119 | * @return int |
||
120 | */ |
||
121 | 30 | public function getCurrentPosition() : int |
|
125 | |||
126 | /** |
||
127 | * Resizes to the current pointer |
||
128 | */ |
||
129 | 30 | public function resizeToFull() |
|
133 | } |
||
134 | |||
135 |
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..