Conditions | 4 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
42 | 166 | private function evalGroup(array $group) |
|
43 | { |
||
44 | 166 | $result = null; |
|
45 | 166 | $operator = null; |
|
46 | |||
47 | 166 | for ($offset = 0; isset($group[1][$offset]); $offset++) { |
|
48 | 164 | $value = $group[1][$offset]; |
|
49 | |||
50 | 164 | if ($this->isLogical($value)) { |
|
51 | 38 | $operator = $value; |
|
52 | 164 | } elseif ($this->isBoolean($value)) { |
|
53 | 164 | $result = $this->setResult($result, $value, $operator); |
|
54 | } else { |
||
55 | 2 | throw new Exception\UnknownSymbolException(sprintf('Unexpected "%s"', $value)); |
|
56 | } |
||
57 | } |
||
58 | |||
59 | 164 | return $result; |
|
60 | } |
||
61 | |||
85 |