Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function validatePlugin($plugin) |
||
30 | { |
||
31 | if ($plugin instanceof FormInterface) { |
||
32 | // we're okay |
||
33 | return; |
||
34 | } |
||
35 | |||
36 | throw new \RuntimeException( |
||
37 | sprintf( |
||
38 | 'Form of type %s is invalid; must implement FormInterface', |
||
39 | (is_object($plugin) ? get_class($plugin) : gettype($plugin)) |
||
40 | ) |
||
41 | ); |
||
42 | } |
||
43 | |||
63 |