Completed
Push — master ( 85994b...9d10cb )
by Dmitry
02:11
created

AbstractAttribute   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 13
ccs 0
cts 3
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRuleForOperator() 0 10 2
1
<?php
2
3
namespace hiapi\query\types;
4
5
abstract class AbstractAttribute implements AttributeInterface
6
{
7
    public function getRuleForOperator($operator)
8
    {
9
        $rules = $this->getOperatorRules();
10
11
        if (isset($rules[$operator])) {
12
            return $rules[$operator];
13
        }
14
15
        throw UnsupportedOperatorException::forOperator($operator);
16
    }
17
}
18