Total Complexity | 9 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
8 | class ConstantFetch extends Base |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $constantName; |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $caller; |
||
18 | |||
19 | public function __construct(string $constantName, string $caller = null) |
||
20 | { |
||
21 | $this->constantName = $constantName; |
||
22 | $this->caller = $caller; |
||
23 | } |
||
24 | |||
25 | public function getConstantName(): string |
||
26 | { |
||
27 | return $this->constantName; |
||
28 | } |
||
29 | |||
30 | public function getCaller(): ?string |
||
33 | } |
||
34 | |||
35 | public function getType(): string |
||
36 | { |
||
37 | return DependencyGraph::TYPE_CONSTANT_FETCH; |
||
38 | } |
||
39 | |||
40 | public function isEqual(Base $that): bool |
||
41 | { |
||
42 | return ( |
||
43 | $that instanceof self && |
||
44 | $this->getConstantName() === $that->getConstantName() && |
||
45 | $this->getCaller() === $that->getCaller() |
||
46 | ); |
||
47 | } |
||
48 | |||
49 | public function toString(): string |
||
57 | } |
||
58 | } |
||
59 |