LexerToken::isToken()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
4
namespace CondParse;
5
6
7
class LexerToken
8
{
9
    /** @var string */
10
    private $token;
11
    /** @var mixed */
12
    private $value;
13
14
    /**
15
     * @param string $token
16
     * @param mixed $value
17
     */
18 13
    public function __construct($token, $value)
19
    {
20 13
        $this->token = $token;
21 13
        $this->value = $value;
22 13
    }
23
24
    /**
25
     * @return string
26
     */
27 11
    public function getToken()
28
    {
29 11
        return $this->token;
30
    }
31
32
    /**
33
     * @return mixed
34
     */
35 11
    public function getValue()
36
    {
37 11
        return $this->value;
38
    }
39
40
    /**
41
     * @param string $token
42
     * @return bool
43
     */
44 11
    public function isToken($token)
45
    {
46 11
        return $this->token === $token;
47
    }
48
}
49