1 | <?php |
||
10 | trait ImmutableArrayAccessTrait |
||
11 | { |
||
12 | /** |
||
13 | * Immutable collections should not have setters or unsetters. |
||
14 | * |
||
15 | * @param $offset |
||
16 | * @param $data |
||
17 | * @throws ImmutableCollectionException |
||
18 | */ |
||
19 | final public function offsetSet($offset, $data) |
||
24 | |||
25 | /** |
||
26 | * Immutable collections should not have setters or unsetters. |
||
27 | * |
||
28 | * @param $offset |
||
29 | * @throws ImmutableCollectionException |
||
30 | */ |
||
31 | final public function offsetUnset($offset) |
||
36 | |||
37 | /** |
||
38 | * @param string $msg |
||
39 | * @throws ImmutableCollectionException |
||
40 | */ |
||
41 | protected function throwImmutable($msg, $errorCode = null) |
||
45 | } |
||
46 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.