Code Duplication    Length = 14-14 lines in 2 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