Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function __invoke(ContainerInterface $container) |
||
19 | { |
||
20 | $aliases = $container->get(Aliases::class); |
||
21 | $file = $aliases->get($this->file); |
||
22 | if (!is_file($file)) { |
||
23 | throw new \Exception('Schema file not found'); |
||
24 | } |
||
25 | $schemaArray = include $file; |
||
26 | return new Schema($schemaArray); |
||
27 | } |
||
29 |