| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 57.14% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | trait ImmutableObjectTrait |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * |
||
| 9 | */ |
||
| 10 | 6 | protected function throwModificationException() |
|
| 11 | { |
||
| 12 | 6 | throw new \LogicException('properties in ' . static::class . ' cannot be modified.'); |
|
| 13 | } |
||
| 14 | |||
| 15 | /** |
||
| 16 | * |
||
| 17 | */ |
||
| 18 | 6 | public function offsetSet($offset, $value) |
|
| 19 | { |
||
| 20 | 6 | $this->throwModificationException(); |
|
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * |
||
| 25 | */ |
||
| 26 | public function offsetUnset($offset) |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.