Completed
Push — master ( 17976d...325209 )
by Portey
07:00
created

TestUnionType   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 1 Features 1
Metric Value
wmc 3
c 1
b 1
f 1
lcom 0
cbo 3
dl 0
loc 18
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A resolveType() 0 4 1
A getTypes() 0 4 1
1
<?php
2
/**
3
 * Date: 16.12.15
4
 *
5
 * @author Portey Vasil <[email protected]>
6
 */
7
8
namespace Youshido\Tests\Type\Union\Schema;
9
10
11
use Youshido\GraphQL\Type\Object\AbstractUnionType;
12
13
class TestUnionType extends AbstractUnionType
14
{
15
16
    public function getName()
17
    {
18
        return 'TestUnionType';
19
    }
20
21
    public function resolveType($object)
22
    {
23
        return new FirstType();
24
    }
25
26
    public function getTypes()
27
    {
28
        return [new FirstType(), new SecondType()];
29
    }
30
}