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