InputObjectType::__construct()   A
last analyzed

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 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 3
dl 0
loc 6
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Andi\GraphQL\Attribute;
6
7
use Attribute;
8
use Spiral\Attributes\NamedArgumentConstructor;
9
10
#[Attribute(Attribute::TARGET_CLASS), NamedArgumentConstructor]
11
final class InputObjectType extends AbstractType
12
{
13
    /**
14
     * @param string|null       $name
15
     * @param string|null       $description
16
     * @param class-string|null $factory     Class must have method: __invoke(array $values): mixed
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string|null at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string|null.
Loading history...
17
     */
18 2
    public function __construct(
19
        ?string $name = null,
20
        ?string $description = null,
21
        public readonly ?string $factory = null,
22
    ) {
23 2
        parent::__construct($name, $description);
24
    }
25
}
26