| Total Complexity | 3 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | class LocateDefinedSymbolsFromExtensions |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @const string composer does some interpolation on the package name of extensions: str_replace(' ', '-', $name) |
||
| 11 | * which means that composer.json must have 'ext-zend-opcache' instead of the correct / exact package name |
||
| 12 | * which is 'ext-Zend Opcache'. So the ALTERNATIVES allows us to look up the correct name, case sensitive |
||
| 13 | * without the '-'. |
||
| 14 | * @see https://github.com/maglnet/ComposerRequireChecker/issues/99 |
||
| 15 | */ |
||
| 16 | private const ALTERNATIVES = ['zend-opcache' => 'Zend Opcache']; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string[] $extensionNames |
||
| 20 | * @return string[] |
||
| 21 | * @throws UnknownExtensionException if the extension cannot be found |
||
| 22 | */ |
||
| 23 | 18 | public function __invoke(array $extensionNames): array |
|
| 43 |