| Conditions | 3 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 16 | public function __invoke(array $extensionNames) : array |
||
| 17 | { |
||
| 18 | $definedSymbols = []; |
||
| 19 | foreach($extensionNames as $extensionName) { |
||
| 20 | try{ |
||
| 21 | $extensionReflection = new \ReflectionExtension($extensionName); |
||
| 22 | $definedSymbols = array_merge( |
||
| 23 | $definedSymbols, |
||
| 24 | array_keys($extensionReflection->getConstants()), |
||
| 25 | array_keys($extensionReflection->getFunctions()), |
||
| 26 | $extensionReflection->getClassNames() |
||
| 27 | ); |
||
| 28 | } catch (\Exception $e) { |
||
| 29 | throw new UnknownExtensionException($e->getMessage()); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | return $definedSymbols; |
||
| 33 | } |
||
| 34 | |||
| 37 | } |