TwitterEntityIndices   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getFrom() 0 4 1
A getTo() 0 4 1
A create() 0 9 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