| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 83 | public function add($elem): void |
|
| 23 | { |
||
| 24 | 83 | if (!$elem instanceof StubInterface) { |
|
| 25 | 1 | throw new InvalidArgumentException( |
|
| 26 | 1 | sprintf( |
|
| 27 | 1 | 'Element must be an instance of "%s", "%s" given', |
|
| 28 | 1 | StubInterface::class, |
|
| 29 | 1 | \gettype($elem) |
|
| 30 | ) |
||
| 31 | ); |
||
| 32 | } |
||
| 33 | |||
| 34 | 82 | parent::add($elem); |
|
| 35 | } |
||
| 36 | } |
||
| 37 |