We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 2 |
| Paths | 2 |
| Total Lines | 22 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 18 | 2 | public function toMappingDefinition(array $config) |
|
| 19 | { |
||
| 20 | 2 | $name = $config['name']; |
|
| 21 | 2 | $resolveType = empty($config['resolveType']) ? null : $config['resolveType']; |
|
| 22 | |||
| 23 | return [ |
||
| 24 | $name => [ |
||
| 25 | 2 | 'type' => 'interface', |
|
| 26 | 'config' => [ |
||
| 27 | 2 | 'name' => $config['name'], |
|
| 28 | 2 | 'description' => 'Fetches an object given its ID', |
|
| 29 | 'fields' => [ |
||
| 30 | 'id' => [ |
||
| 31 | 2 | 'type' => 'ID!', |
|
| 32 | 2 | 'description' => 'The ID of an object', |
|
| 33 | 2 | ], |
|
| 34 | 2 | ], |
|
| 35 | 2 | 'resolveType' => $resolveType, |
|
| 36 | 2 | ], |
|
| 37 | 2 | ], |
|
| 38 | 2 | ]; |
|
| 39 | } |
||
| 40 | } |
||
| 41 |