Completed
Push — master ( 9eb60a...7a0a03 )
by Colin
36:39 queued 35:14
created

Image   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 15
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 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\Inline;
16
17
use League\CommonMark\Node\Inline\Text;
18
19
class Image extends AbstractWebResource
20
{
21
    public function __construct(string $url, ?string $label = null, ?string $title = null)
22
    {
23
        parent::__construct($url);
24
25
        if (!empty($label)) {
26
            $this->appendChild(new Text($label));
27
        }
28
29
        if (!empty($title)) {
30
            $this->data['title'] = $title;
31
        }
32
    }
33
}
34