Conditions | 3 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
56 | 8 | private function checkElementIsValid($element) |
|
57 | { |
||
58 | 8 | $elementClass = get_class($element); |
|
59 | |||
60 | 8 | if ($this->getValidClassName() !== $elementClass && ! is_subclass_of($element, $this->getValidClassName())) { |
|
61 | 1 | throw new InvalidClassException($this->getValidClassName()); |
|
62 | } |
||
63 | |||
64 | 7 | return true; |
|
65 | } |
||
137 |