AbstractLeftRightOperator::consumeTokens()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 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