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

AbstractWebResource   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 27
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getUrl() 0 4 1
A setUrl() 0 4 1
A isContainer() 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\Extension\CommonMark\Node\Inline;
16
17
use League\CommonMark\Node\Inline\AbstractInline;
18
19
abstract class AbstractWebResource extends AbstractInline
20
{
21
    /**
22
     * @var string
23
     */
24
    protected $url;
25
26 609
    public function __construct(string $url)
27
    {
28 609
        $this->url = $url;
29 609
    }
30
31 606
    public function getUrl(): string
32
    {
33 606
        return $this->url;
34
    }
35
36 3
    public function setUrl(string $url): void
37
    {
38 3
        $this->url = $url;
39 3
    }
40
41 45
    public function isContainer(): bool
42
    {
43 45
        return true;
44
    }
45
}
46