Sorting   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 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`
18
     */
19 13
    public function __construct(
20
        public readonly string $class,
21 13
    ) {}
22
}
23