AbstractLeftRightOperator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A consumeTokens() 0 7 1
1
<?php
2
3
4
namespace CondParse\Operand;
5
6
7
use CondParse\OperandInterface;
8
use CondParse\OperandStack;
9
10
abstract class AbstractLeftRightOperator extends AbstractOperand
11
{
12
    /** @var OperandInterface */
13
    protected $leftOperand;
14
    /** @var OperandInterface */
15
    protected $rightOperand;
16
17
    /**
18
     * @param OperandStack $operandStack
19
     * @return $this
20
     */
21 22
    public function consumeTokens(OperandStack $operandStack)
22
    {
23 22
        $this->rightOperand = $operandStack->pop();
24 22
        $this->leftOperand = $operandStack->pop();
25
26 22
        return $this;
27
    }
28
}
29