Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 12 |
Ratio | 100 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
60 | 5 | protected function blockReadOnlyProperties(string $name) { |
|
61 | switch ($name) { |
||
62 | 5 | case 'nextElementSibling' : |
|
63 | 4 | case 'previousElementSibling' : |
|
64 | 2 | throw new \BadMethodCallException( |
|
65 | 2 | sprintf( |
|
66 | 2 | 'Can not write readonly property %s::$%s.', |
|
67 | 2 | get_class($this), $name |
|
68 | ) |
||
69 | ); |
||
70 | } |
||
71 | 3 | } |
|
72 | } |
||
73 | } |