Test Failed
Pull Request — main (#94)
by Tom
03:03
created

Filters   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 30
c 1
b 0
f 0
dl 0
loc 35
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
    /** @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