| Conditions | 3 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 2 | public static function load(string $pluginName): string |
|
| 26 | { |
||
| 27 | 2 | $pluginFQCN = self::generateFQCN($pluginName); |
|
| 28 | |||
| 29 | if ( |
||
| 30 | 2 | !class_exists($pluginFQCN) || |
|
| 31 | 2 | !in_array(PluginInterface::class, class_implements($pluginFQCN), true) |
|
| 32 | ) { |
||
| 33 | 1 | throw new NotImplementedException( |
|
| 34 | 1 | sprintf( |
|
| 35 | 1 | 'Mocking strategy "%s" does not exist', |
|
| 36 | 1 | $pluginName |
|
| 37 | ) |
||
| 38 | ); |
||
| 39 | } |
||
| 40 | |||
| 41 | 1 | return $pluginFQCN; |
|
| 42 | } |
||
| 43 | |||
| 57 |