Completed
Push — master ( 0b0b24...54ff37 )
by Colin
02:37
created

Newline::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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\Inline;
16
17
class Newline extends AbstractInline
18
{
19
    // Any changes to these constants should be reflected in .phpstorm.meta.php
20
    const HARDBREAK = 0;
21
    const SOFTBREAK = 1;
22
23
    /** @var int */
24
    protected $type;
25
26 465
    public function __construct(int $breakType = self::HARDBREAK)
27
    {
28 465
        $this->type = $breakType;
29 465
    }
30
31 273
    public function getType(): int
32
    {
33 273
        return $this->type;
34
    }
35
}
36