UnionTypeDefinitionLocator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of Railt package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
declare(strict_types=1);
11
12
namespace Railt\SDL\Backend\Context;
13
14
use GraphQL\Contracts\TypeSystem\Type\UnionTypeInterface;
15
use Railt\TypeSystem\Type\UnionType;
16
17
/**
18
 * Class UnionTypeDefinitionContext
19
 */
20
final class UnionTypeDefinitionLocator extends TypeDefinitionLocator
21
{
22
    /**
23
     * @param array $args
24
     * @return UnionTypeInterface
25
     * @throws \Throwable
26
     */
27
    public function build(array $args): UnionTypeInterface
28
    {
29
        return new UnionType($this->getName(), [
30
            'description' => $this->description($this->ast),
31
        ]);
32
    }
33
}
34