Completed
Pull Request — master (#19)
by David
02:28 queued 33s
created

AbstractAnnotatedObjectType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A build() 0 5 1
1
<?php
2
3
4
namespace TheCodingMachine\GraphQL\Controllers;
5
6
7
use TheCodingMachine\GraphQL\Controllers\Registry\RegistryInterface;
8
use Youshido\GraphQL\Type\Object\AbstractObjectType;
9
10
abstract class AbstractAnnotatedObjectType extends AbstractObjectType
11
{
12
    /**
13
     * @var RegistryInterface
14
     */
15
    private $registry;
16
17
    public function __construct(RegistryInterface $registry)
18
    {
19
        $this->registry = $registry;
20
        parent::__construct([]);
21
    }
22
23
    /**
24
     * @param ObjectTypeConfig $config
0 ignored issues
show
Bug introduced by
The type TheCodingMachine\GraphQL...ollers\ObjectTypeConfig was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
25
     */
26
    public function build($config)
27
    {
28
        $fieldProvider = new ControllerQueryProvider($this, $this->registry);
29
        $fields = $fieldProvider->getFields();
30
        $this->addFields($fields);
31
    }
32
}