NodeWalkerEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 38
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getNode() 0 4 1
A isEntering() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the league/commonmark package.
5
 *
6
 * (c) Colin O'Dell <[email protected]>
7
 *
8
 * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
9
 *  - (c) John MacFarlane
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace League\CommonMark\Node;
16
17
final class NodeWalkerEvent
18
{
19
    /**
20
     * @var Node
21
     */
22
    private $node;
23
24
    /**
25
     * @var bool
26
     */
27
    private $isEntering;
28
29
    /**
30
     * @param Node $node
31
     * @param bool $isEntering
32
     */
33 2076
    public function __construct(Node $node, $isEntering = true)
34
    {
35 2076
        $this->node = $node;
36 2076
        $this->isEntering = $isEntering;
37 2076
    }
38
39
    /**
40
     * @return Node
41
     */
42 2076
    public function getNode(): Node
43
    {
44 2076
        return $this->node;
45
    }
46
47
    /**
48
     * @return bool
49
     */
50 2076
    public function isEntering(): bool
51
    {
52 2076
        return $this->isEntering;
53
    }
54
}
55