Completed
Push — master ( 3b79f3...426227 )
by Kirill
03:11
created

InterfaceBuilder::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of Railt package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
declare(strict_types=1);
9
10
namespace Railt\Adapters\Webonyx\Builders;
11
12
use GraphQL\Type\Definition\InterfaceType;
13
use GraphQL\Type\Definition\Type;
14
use Railt\Reflection\Contracts\Definitions\InterfaceDefinition;
0 ignored issues
show
Bug introduced by
The type Railt\Reflection\Contrac...ons\InterfaceDefinition 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...
15
16
/**
17
 * @property InterfaceDefinition $reflection
18
 */
19
class InterfaceBuilder extends TypeBuilder
20
{
21
    /**
22
     * @return Type
23
     */
24
    public function build(): Type
25
    {
26
        return new InterfaceType([
27
            'name'        => $this->reflection->getName(),
28
            'description' => $this->reflection->getDescription(),
29
            'fields'      => function (): array {
30
                return [];
31
            },
32
        ]);
33
    }
34
}
35