AbstractOperand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
4
namespace CondParse\Operand;
5
6
7
use CondParse\LexerToken;
8
use CondParse\OperandInterface;
9
10
abstract class AbstractOperand implements OperandInterface
11
{
12
    /** @var string */
13
    protected $token;
14
15
    /** @var mixed */
16
    protected $value;
17
18
    /**
19
     * @param LexerToken $lexerToken
20
     */
21 35
    public function __construct(LexerToken $lexerToken)
22
    {
23 35
        $this->token = $lexerToken->getToken();
24 35
        $this->value = $lexerToken->getValue();
25 35
    }
26
}
27