Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function validatePlugin($transformer) |
||
34 | { |
||
35 | if ($transformer instanceof TransformerInterface) { |
||
36 | return; // we're okay |
||
37 | } |
||
38 | |||
39 | throw new Exception\RuntimeException(sprintf( |
||
40 | 'Transformer of type %s is invalid; must implement %s', |
||
41 | (is_object($transformer) ? get_class($transformer) : gettype($transformer)), |
||
42 | TransformerInterface::class |
||
43 | )); |
||
44 | } |
||
45 | } |
||
46 |