TwitterSymbol::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Twitter\Object;
4
5
use Twitter\TwitterEntity;
6
7
class TwitterSymbol extends TwitterEntity
8
{
9
    /**
10
     * @var string
11
     */
12
    private $text;
13
14
    /**
15
     * Constructor.
16
     */
17 9
    public function __construct()
18
    {
19 9
    }
20
21
    /**
22
     * @return string
23
     */
24 9
    public function getText()
25
    {
26 9
        return $this->text;
27
    }
28
29
    /**
30
     * Static constructor.
31
     *
32
     * @param string               $text
33
     * @param TwitterEntityIndices $indices
34
     *
35
     * @return TwitterSymbol
36
     */
37 9
    public static function create($text, TwitterEntityIndices $indices)
38
    {
39 9
        $obj = new self();
40
41 9
        $obj->initTwitterEntity($indices);
42
43 9
        $obj->text = $text;
44
45 9
        return $obj;
46
    }
47
}
48