We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 4 |
| Paths | 7 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public static function parse(SplFileInfo $file, ContainerBuilder $container) |
||
| 29 | { |
||
| 30 | $typesConfig = []; |
||
| 31 | |||
| 32 | try { |
||
| 33 | //@todo fix xml validateSchema |
||
| 34 | $xml = XmlUtils::loadFile($file->getRealPath()); |
||
| 35 | foreach ($xml->documentElement->childNodes as $node) { |
||
| 36 | if (!$node instanceof \DOMElement) { |
||
| 37 | continue; |
||
| 38 | } |
||
| 39 | $values = XmlUtils::convertDomElementToArray($node); |
||
| 40 | $typesConfig = array_merge($typesConfig, $values); |
||
| 41 | } |
||
| 42 | $container->addResource(new FileResource($file->getRealPath())); |
||
| 43 | } catch (\InvalidArgumentException $e) { |
||
| 44 | throw new InvalidArgumentException(sprintf('Unable to parse file "%s".', $file), $e->getCode(), $e); |
||
| 45 | } |
||
| 46 | |||
| 47 | return $typesConfig; |
||
| 48 | } |
||
| 49 | } |
||
| 50 |