TwitterEntityIndices::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 9.6666
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\TwitterSerializable;
6
7
class TwitterEntityIndices implements TwitterSerializable
8
{
9
    /**
10
     * @var int
11
     */
12
    private $from;
13
14
    /**
15
     * @var int
16
     */
17
    private $to;
18
19
    /**
20
     * Constructor.
21
     */
22 9
    public function __construct()
23
    {
24 9
    }
25
26
    /**
27
     * @return int
28
     */
29 9
    public function getFrom()
30
    {
31 9
        return $this->from;
32
    }
33
34
    /**
35
     * @return int
36
     */
37 9
    public function getTo()
38
    {
39 9
        return $this->to;
40
    }
41
42
    /**
43
     * Static constructor.
44
     *
45
     * @param int $from
46
     * @param int $to
47
     *
48
     * @return TwitterEntityIndices
49
     */
50 9
    public static function create($from, $to)
51
    {
52 9
        $obj = new self();
53
54 9
        $obj->from = $from;
55 9
        $obj->to = $to;
56
57 9
        return $obj;
58
    }
59
}
60