Completed
Push — master ( bcdd48...673801 )
by David
20:07
created

AbstractFooType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A customField() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
4
namespace TheCodingMachine\GraphQL\Controllers\Fixtures\Types;
5
6
use TheCodingMachine\GraphQL\Controllers\AbstractAnnotatedObjectType;
7
use TheCodingMachine\GraphQL\Controllers\Annotations\Right;
8
use TheCodingMachine\GraphQL\Controllers\Annotations\SourceField;
9
use TheCodingMachine\GraphQL\Controllers\Annotations\Field;
10
use TheCodingMachine\GraphQL\Controllers\Annotations\Type;
11
use TheCodingMachine\GraphQL\Controllers\Fixtures\TestObject;
12
use TheCodingMachine\GraphQL\Controllers\Registry\Registry;
13
use TheCodingMachine\GraphQL\Controllers\Registry\RegistryInterface;
14
use Youshido\GraphQL\Config\Object\ObjectTypeConfig;
15
use Youshido\GraphQL\Type\Object\AbstractObjectType;
16
17
abstract class AbstractFooType extends AbstractAnnotatedObjectType
18
{
19
    public function __construct(RegistryInterface $registry)
20
    {
21
        parent::__construct($registry);
22
    }
23
24
    /**
25
     * @Field()
26
     * @param TestObject $test
27
     * @param string $param
28
     * @return string
29
     */
30
    public function customField(TestObject $test, string $param = 'foo'): string
31
    {
32
        return $test->getTest().$param;
33
    }
34
}
35