Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
46 | public static function create(array $children): self |
||
47 | { |
||
48 | $schema = new static(); |
||
49 | |||
50 | foreach ($children as $child) { |
||
51 | switch (true) { |
||
52 | case $child instanceof DirectiveNode: |
||
53 | $schema->directives[] = $child; |
||
54 | break; |
||
55 | |||
56 | case $child instanceof OperationTypeDefinitionNode: |
||
57 | $schema->operationTypes[] = $child; |
||
58 | break; |
||
59 | } |
||
60 | } |
||
61 | |||
62 | return $schema; |
||
63 | } |
||
65 |