Completed
Push — master ( e5166b...56b74c )
by Ilias
02:47
created

LexerToken::isToken()   A

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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
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 42
    public function __construct($token, $value)
19
    {
20 42
        $this->token = $token;
21 42
        $this->value = $value;
22 42
    }
23
24
    /**
25
     * @return string
26
     */
27 24
    public function getToken()
28
    {
29 24
        return $this->token;
30
    }
31
32
    /**
33
     * @return mixed
34
     */
35 24
    public function getValue()
36
    {
37 24
        return $this->value;
38
    }
39
40
    /**
41
     * @param string $token
42
     * @return bool
43
     */
44 17
    public function isToken($token)
45
    {
46 17
        return $this->token === $token;
47
    }
48
}
49