| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | trait ImmutableObjectHelperMethods |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * Prevent implicit setting of properties |
||
| 27 | * |
||
| 28 | * @param string $property - Property name to set |
||
| 29 | * @param mixed $value - Mixed value to set property to |
||
| 30 | * @return void |
||
| 31 | * @throws ImmutableMethodCallException - Always throws an exception |
||
| 32 | */ |
||
| 33 | 1 | final public function __set(string $property, $value): void |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Prevent implicit unsetting of properties |
||
| 40 | * |
||
| 41 | * @param string $property - Property name to set |
||
| 42 | * @return void |
||
| 43 | * @throws ImmutableMethodCallException - Always throws an exception |
||
| 44 | */ |
||
| 45 | 1 | final public function __unset(string $property): void |
|
| 50 |