| Conditions | 2 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2.0018 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 4 | protected function build(TypeConfigInterface $config) |
|
| 20 | { |
||
| 21 | $config |
||
| 22 | 4 | ->addField('name', TypeMap::TYPE_STRING) |
|
| 23 | 4 | ->addField('description', TypeMap::TYPE_STRING) |
|
| 24 | 4 | ->addField('isDeprecated', TypeMap::TYPE_BOOLEAN) |
|
| 25 | 4 | ->addField('deprecationReason', TypeMap::TYPE_STRING) |
|
| 26 | 4 | ->addField('type', new QueryType(), [ |
|
| 27 | 2 | 'resolve' => function($value, $args) { |
|
|
|
|||
| 28 | /** @var $value Field */ |
||
| 29 | 2 | if($value->getConfig()->getType()->getKind() == TypeMap::KIND_INPUT_OBJECT) { |
|
| 30 | return $value->getConfig()->getType()->getConfig()->getOutputType(); |
||
| 31 | } |
||
| 32 | |||
| 33 | 2 | return $value->getType(); |
|
| 34 | } |
||
| 35 | 4 | ]) |
|
| 36 | 4 | ->addField('args', new InputValueListType()); |
|
| 37 | 4 | } |
|
| 38 | |||
| 52 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.