| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function validatePlugin($plugin) |
||
| 43 | { |
||
| 44 | if ($plugin instanceof HelperInterface) { |
||
| 45 | // we're okay |
||
| 46 | return; |
||
| 47 | } |
||
| 48 | |||
| 49 | throw new InvalidHelperException( |
||
| 50 | sprintf( |
||
| 51 | 'Plugin of type %s is invalid; must implement %s\LoopHelper\HelperInterface', |
||
| 52 | (is_object($plugin) ? get_class($plugin) : gettype($plugin)), |
||
| 53 | __NAMESPACE__ |
||
| 54 | ) |
||
| 55 | ); |
||
| 56 | } |
||
| 57 | } |
||
| 58 |