Passed
Pull Request — main (#94)
by Tom
03:24
created

Filters::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 15
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 17
rs 9.7666
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
    /** @return string[] */
25
    public static function toArray(): array
26
    {
27
        return [
28
            self::EQ,
29
            self::NEQ,
30
            self::LT,
31
            self::LTE,
32
            self::GT,
33
            self::GTE,
34
            self::BETWEEN,
35
            self::CONTAINS,
36
            self::STARTSWITH,
37
            self::ENDSWITH,
38
            self::IN,
39
            self::NOTIN,
40
            self::ISNULL,
41
            self::SORT,
42
        ];
43
    }
44
}
45