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

Sorting   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQL\Doctrine\Attribute;
6
7
use Attribute;
8
use GraphQL\Doctrine\Sorting\SortingInterface;
9
10
/**
11
 * Attribute used to define custom sorting.
12
 */
13
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
14
final class Sorting implements ApiAttribute
15
{
16
    /**
17
     * @param class-string<SortingInterface> $class FQCN of PHP class implementing `SortingInterface`
1 ignored issue
show
Documentation Bug introduced by
The doc comment class-string<SortingInterface> at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string<SortingInterface>.
Loading history...
18
     */
19 11
    public function __construct(public readonly string $class)
20
    {
21
    }
22
}
23