Completed
Push — master ( d2636b...e88807 )
by Colin
02:51
created

ListData::equals()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 6
Code Lines 4

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 9.4285
c 0
b 0
f 0
cc 3
eloc 4
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\Block\Element;
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
36
     */
37
    public $delimiter;
38
39
    /**
40
     * @var string
41
     */
42
    public $bulletChar;
43
44
    /**
45
     * @var int
46
     */
47
    public $markerOffset;
48
49
    /**
50
     * @param ListData $data
51
     *
52
     * @return bool
53
     */
54 81
    public function equals(ListData $data)
55
    {
56 81
        return $this->type === $data->type &&
57 81
            $this->delimiter === $data->delimiter &&
58 81
            $this->bulletChar === $data->bulletChar;
59
    }
60
}
61