We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 3 |
| Paths | 6 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 19 | public static function parse(SplFileInfo $file, ContainerBuilder $container) |
|
| 32 | { |
||
| 33 | 19 | if (null === self::$yamlParser) { |
|
| 34 | 1 | self::$yamlParser = new Parser(); |
|
| 35 | } |
||
| 36 | |||
| 37 | try { |
||
| 38 | 19 | $typesConfig = self::$yamlParser->parse($file->getContents()); |
|
| 39 | 18 | $container->addResource(new FileResource($file->getRealPath())); |
|
| 40 | 1 | } catch (ParseException $e) { |
|
| 41 | 1 | throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $file), 0, $e); |
|
| 42 | } |
||
| 43 | |||
| 44 | 18 | return $typesConfig; |
|
| 45 | } |
||
| 46 | } |
||
| 47 |