InputObjectType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 14
ccs 2
cts 2
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
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