Test Failed
Push — master ( 4bdf7b...97fe68 )
by Kirill
02:15
created

InputInvocation::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 4
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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\Reflection\Invocation;
11
12
use Railt\Reflection\AbstractTypeInvocation;
13
use Railt\Reflection\Contracts\Document as DocumentInterface;
14
use Railt\Reflection\Contracts\Invocation\InputInvocation as InputInvocationInterface;
15
use Railt\Reflection\Contracts\TypeInterface;
16
use Railt\Reflection\Document;
17
use Railt\Reflection\Invocation\Behaviour\HasArguments;
18
use Railt\Reflection\Type;
19
20
/**
21
 * Class InputInvocation
22
 */
23
class InputInvocation extends AbstractTypeInvocation implements InputInvocationInterface
24
{
25
    use HasArguments;
26
27
    /**
28
     * InputInvocation constructor.
29
     * @param Document|DocumentInterface $document
30
     * @param string|null $name
31
     */
32
    public function __construct(Document $document, string $name = null)
33
    {
34
        parent::__construct($document, $name);
35
    }
36
37
    /**
38
     * @return TypeInterface
39
     */
40
    public static function getType(): TypeInterface
41
    {
42
        return Type::of(Type::INPUT_OBJECT);
43
    }
44
}
45