We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 3 |
| Paths | 2 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | 1 | public static function toConfig(Node $node): array |
|
| 12 | { |
||
| 13 | 1 | $config = DescriptionNode::toConfig($node); |
|
| 14 | |||
| 15 | 1 | if (!empty($node->types)) { |
|
| 16 | 1 | $types = []; |
|
| 17 | 1 | foreach ($node->types as $type) { |
|
| 18 | 1 | $types[] = TypeNode::astTypeNodeToString($type); |
|
| 19 | } |
||
| 20 | 1 | $config['types'] = $types; |
|
| 21 | } |
||
| 22 | |||
| 23 | return [ |
||
| 24 | 1 | 'type' => 'union', |
|
| 25 | 1 | 'config' => $config, |
|
| 26 | ]; |
||
| 27 | } |
||
| 28 | } |
||
| 29 |