| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class InterfaceHelper |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Get every class that implements $interfaceName |
||
| 14 | * |
||
| 15 | * @param string $interfaceName |
||
| 16 | * @return array |
||
| 17 | */ |
||
| 18 | 5 | public static function getImplementations(string $interfaceName) : array |
|
| 23 | 5 | }); |
|
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Returns true|false if the $implementerClassName implements interface $interfaceName |
||
| 28 | * |
||
| 29 | * @param string $implementerClassName class name of the implementation class to test |
||
| 30 | * @param string $interfaceName name of the interface that should be implemented |
||
| 31 | * @return bool TRUE if the $implementerClassName implements $interfaceName, FALSE otherwise |
||
| 32 | */ |
||
| 33 | 32 | public static function implementsInterface(string $implementerClassName, string $interfaceName) : bool |
|
| 36 | } |
||
| 37 | } |