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

Sorting::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 2
rs 10
ccs 1
cts 1
cp 1
cc 1
nc 1
nop 1
crap 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