Newline   A
last analyzed

Coupling/Cohesion

Components 0
Dependencies 1

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

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\Inline\Element;
16
17
class Newline extends AbstractInline
18
{
19
    const HARDBREAK = 0;
20
    const SOFTBREAK = 1;
21
22
    protected $type;
23
24
    /**
25
     * @param int $breakType
26
     */
27 219
    public function __construct($breakType = self::HARDBREAK)
28
    {
29 219
        $this->type = $breakType;
30 219
    }
31
32
    /**
33
     * @return int
34
     */
35 219
    public function getType()
36
    {
37 219
        return $this->type;
38
    }
39
}
40