Passed
Pull Request — master (#63)
by Mark
23:06
created

Sorting   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
dl 0
loc 16
rs 10
c 1
b 0
f 0

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\Annotation;
6
7
use Attribute;
8
use GraphQL\Doctrine\Sorting\SortingInterface;
9
10
/**
11
 * Annotation used to define custom sorting.
12
 *
13
 * @Annotation
14
 * @NamedArgumentConstructor
15
 * @Target({"CLASS"})
16
 */
17
#[Attribute(Attribute::TARGET_CLASS)]
18
final class Sorting
19
{
20
    /**
21
     * FQCN of PHP class implementing `SortingInterface`.
22
     *
23
     * @var array<string>
24
     */
25
    public array $classes = [];
26
27
    /**
28
     * @param array<string> $classes
29
     */
30
    public function __construct(array $classes)
31
    {
32
        $this->classes = $classes;
33
    }
34
}
35