Passed
Pull Request — main (#93)
by Tom
02:43
created

Filters   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 17 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApiSkeletons\Doctrine\GraphQL\Criteria;
6
7
final class Filters
8
{
9
    public const EQ         = 'eq';
10
    public const NEQ        = 'neq';
11
    public const LT         = 'lt';
12
    public const LTE        = 'lte';
13
    public const GT         = 'gt';
14
    public const GTE        = 'gte';
15
    public const BETWEEN    = 'between';
16
    public const CONTAINS   = 'contains';
17
    public const STARTSWITH = 'startswith';
18
    public const ENDSWITH   = 'endswith';
19
    public const IN         = 'in';
20
    public const NOTIN      = 'notin';
21
    public const ISNULL     = 'isnull';
22
    public const SORT       = 'sort';
23
24
    /**
0 ignored issues
show
introduced by
Found multi-line doc comment with single line content, use one-line doc comment instead.
Loading history...
25
     * @return string[]
26
     */
27
    public static function toArray(): array
28
    {
29
        return [
30
            self::EQ,
31
            self::NEQ,
32
            self::LT,
33
            self::LTE,
34
            self::GT,
35
            self::GTE,
36
            self::BETWEEN,
37
            self::CONTAINS,
38
            self::STARTSWITH,
39
            self::ENDSWITH,
40
            self::IN,
41
            self::NOTIN,
42
            self::ISNULL,
43
            self::SORT,
44
        ];
45
    }
46
}
47