Completed
Pull Request — master (#14)
by
unknown
02:14
created

SearchTextDataType::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
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 SearchTextDataType 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_STRING_EQ,
18
            FilterCondition::METHOD_STRING_LIKE,
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_STRING_LIKE;
30
    }
31
32
    /**
33
     * Return the name of the type, unique.
34
     *
35
     * @return string
36
     */
37
    public function getName()
38
    {
39
        return 'search_text';
40
    }
41
}
42