Completed
Push — master ( 7a0a03...73b89e )
by Colin
02:28
created

ListData::equals()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 3

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 3
nc 3
nop 1
crap 3
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\Extension\CommonMark\Node\Block;
16
17
class ListData
18
{
19
    /**
20
     * @var int|null
21
     */
22
    public $start;
23
24
    /**
25
     * @var int
26
     */
27
    public $padding = 0;
28
29
    /**
30
     * @var string
31
     */
32
    public $type;
33
34
    /**
35
     * @var string|null
36
     */
37
    public $delimiter;
38
39
    /**
40
     * @var string|null
41
     */
42
    public $bulletChar;
43
44
    /**
45
     * @var int
46
     */
47
    public $markerOffset;
48
49 99
    public function equals(ListData $data): bool
50
    {
51 99
        return $this->type === $data->type &&
52 99
            $this->delimiter === $data->delimiter &&
53 99
            $this->bulletChar === $data->bulletChar;
54
    }
55
}
56