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

AbstractFooType::customField()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
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