Completed
Push — master ( 4ff8dd...182498 )
by Colin
8s
created

AbstractWebResource::setUrl()   A

Complexity

Conditions 1
Paths 1

Duplication

Lines 0
Ratio 0 %

Size

Total Lines 6
Code Lines 3

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
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\Inline\Element;
16
17
abstract class AbstractWebResource extends AbstractInlineContainer
18
{
19
    /**
20
     * @var string
21
     */
22
    protected $url;
23
24 384
    public function __construct($url)
25
    {
26 384
        $this->url = $url;
27 384
    }
28
29
    /**
30
     * @return string
31
     */
32 384
    public function getUrl()
33
    {
34 384
        return $this->url;
35
    }
36
37
    /**
38
     * @param string $url
39
     *
40
     * @return $this
41
     */
42 3
    public function setUrl($url)
43
    {
44 3
        $this->url = $url;
45
46 3
        return $this;
47
    }
48
}
49