We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 4 |
Paths | 4 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
17 | 2 | public static function astTypeNodeToString(\GraphQL\Language\AST\TypeNode $typeNode): string |
|
18 | { |
||
19 | 2 | $type = ''; |
|
20 | 2 | switch ($typeNode->kind) { |
|
21 | case NodeKind::NAMED_TYPE: |
||
22 | 2 | $type = $typeNode->name->value; |
|
23 | 2 | break; |
|
24 | |||
25 | case NodeKind::NON_NULL_TYPE: |
||
26 | 2 | $type = self::astTypeNodeToString($typeNode->type).'!'; |
|
27 | 2 | break; |
|
28 | |||
29 | case NodeKind::LIST_TYPE: |
||
30 | 2 | $type = '['.self::astTypeNodeToString($typeNode->type).']'; |
|
31 | 2 | break; |
|
32 | } |
||
33 | |||
34 | 2 | return $type; |
|
35 | } |
||
36 | } |
||
37 |