Code Duplication    Length = 14-14 lines in 3 locations

src/query/types/IntegerAttribute.php 1 location

@@ 5-18 (lines=14) @@
2
3
namespace hiapi\query\types;
4
5
class IntegerAttribute extends AbstractAttribute
6
{
7
    public function getOperatorRules()
8
    {
9
        return [
10
            'eq' => ['integer'],
11
            'ne' => ['integer'],
12
            'gt' => ['integer'],
13
            'lt' => ['integer'],
14
            'in' => ['each', 'rule' => ['integer']],
15
            'ni' => ['each', 'rule' => ['integer']],
16
        ];
17
    }
18
}
19

src/query/types/StringAttribute.php 1 location

@@ 5-18 (lines=14) @@
2
3
namespace hiapi\query\types;
4
5
class StringAttribute extends AbstractAttribute
6
{
7
    public function getOperatorRules()
8
    {
9
        return [
10
            'eq' => ['string'],
11
            'ne' => ['string'],
12
            'in' => ['each', 'rule' => ['string']],
13
            'ni' => ['each', 'rule' => ['string']],
14
            'like' => ['string'],
15
            'ilike' => ['string'],
16
        ];
17
    }
18
}
19

src/query/types/FloatAttribute.php 1 location

@@ 10-23 (lines=14) @@
7
 *
8
 * @author Dmytro Naumenko <[email protected]>
9
 */
10
class FloatAttribute extends AbstractAttribute
11
{
12
    public function getOperatorRules()
13
    {
14
        return [
15
            'eq' => ['float'],
16
            'ne' => ['float'],
17
            'gt' => ['float'],
18
            'lt' => ['float'],
19
            'in' => ['each', 'rule' => ['float']],
20
            'ni' => ['each', 'rule' => ['float']],
21
        ];
22
    }
23
}
24