Failed Conditions
Push — master ( 05fc61...964283 )
by Adrien
02:24
created

Input::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 6
rs 10
ccs 2
cts 2
cp 1
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQL\Doctrine\Attribute;
6
7
use Attribute;
8
9
/**
10
 * Attribute used to override values for an input field in GraphQL.
11
 *
12
 * All values are optional and should only be used to override
13
 * what is declared by the original method.
14
 */
15
#[Attribute(Attribute::TARGET_METHOD)]
16
final class Input extends AbstractAttribute
17
{
18
    /**
19
     * @param null|string $type FQCN of PHP class implementing the GraphQL type
20
     */
21 7
    public function __construct(
22
        ?string $type = null,
23
        ?string $description = null,
24
        mixed $defaultValue = self::NO_VALUE_PASSED,
25
    ) {
26 7
        parent::__construct(null, $type, $description, $defaultValue);
27
    }
28
}
29