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 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function toMappingDefinition(array $config): array |
||
12 | { |
||
13 | if (!isset($config['nodeType']) || !\is_string($config['nodeType'])) { |
||
14 | throw new \InvalidArgumentException('Using the Relay Edge fields builder, the key "nodeType" defining the GraphQL type of the node is required and must be a string.'); |
||
15 | } |
||
16 | |||
17 | $nodeType = $config['nodeType']; |
||
18 | $nodeDescription = $config['nodeDescription'] ?? 'Node of the Edge'; |
||
19 | |||
20 | return [ |
||
21 | 'node' => [ |
||
22 | 'description' => $nodeDescription, |
||
23 | 'type' => $nodeType, |
||
24 | ], |
||
25 | 'cursor' => [ |
||
26 | 'description' => 'The edge cursor', |
||
27 | 'type' => 'String!', |
||
28 | ], |
||
32 |