TwitterUrl::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Twitter\Object;
4
5
use Twitter\TwitterEntity;
6
7
class TwitterUrl extends TwitterEntity
8
{
9
    /**
10
     * @var string
11
     */
12
    private $url;
13
14
    /**
15
     * @var string
16
     */
17
    private $displayUrl;
18
19
    /**
20
     * @var string
21
     */
22
    private $expandedUrl;
23
24
    /**
25
     * Constructor.
26
     */
27 9
    public function __construct()
28
    {
29 9
    }
30
31
    /**
32
     * @return string
33
     */
34 9
    public function getDisplayUrl()
35
    {
36 9
        return $this->displayUrl;
37
    }
38
39
    /**
40
     * @return string
41
     */
42 9
    public function getExpandedUrl()
43
    {
44 9
        return $this->expandedUrl;
45
    }
46
47
    /**
48
     * @return string
49
     */
50 9
    public function getUrl()
51
    {
52 9
        return $this->url;
53
    }
54
55
    /**
56
     * Static constructor.
57
     *
58
     * @param string               $url
59
     * @param string               $displayUrl
60
     * @param string               $expandedUrl
61
     * @param TwitterEntityIndices $indices
62
     *
63
     * @return TwitterUrl
64
     */
65 9
    public static function create($url, $displayUrl, $expandedUrl, TwitterEntityIndices $indices)
66
    {
67 9
        $obj = new self();
68
69 9
        $obj->initTwitterEntity($indices);
70
71 9
        $obj->displayUrl = $displayUrl;
72 9
        $obj->expandedUrl = $expandedUrl;
73 9
        $obj->url = $url;
74
75 9
        return $obj;
76
    }
77
}
78