EntityDataType::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Netdudes\DataSourceryBundle\DataType;
4
5
use Netdudes\DataSourceryBundle\Query\FilterCondition;
6
7
class EntityDataType extends AbstractDataType
8
{
9
    /**
10
     * Return an array of available filter methods
11
     *
12
     * @return array
13
     */
14
    public function getAvailableFilterMethods()
15
    {
16
        return [
17
            FilterCondition::METHOD_NUMERIC_EQ,
18
            FilterCondition::METHOD_NUMERIC_NEQ,
19
        ];
20
    }
21
22
    /**
23
     * Return the identifier of the default sort method
24
     *
25
     * @return int
26
     */
27
    public function getDefaultFilterMethod()
28
    {
29
        return FilterCondition::METHOD_NUMERIC_EQ;
30
    }
31
32
    /**
33
     * Return the name of the type, unique.
34
     *
35
     * @return string
36
     */
37
    public function getName()
38
    {
39
        return 'entity';
40
    }
41
}
42