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

Newline   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 19
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getType() 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\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