TwitterFriends   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
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 46
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getFriends() 0 4 1
A __toString() 0 4 1
A create() 0 8 1
1
<?php
2
3
namespace Twitter\Object;
4
5
use Twitter\TwitterObject;
6
7
class TwitterFriends implements TwitterObject
8
{
9
    /**
10
     * @var int[]
11
     */
12
    private $friends;
13
14
    /**
15
     * Constructor.
16
     */
17 9
    public function __construct()
18
    {
19 9
    }
20
21
    /**
22
     * @return \int[]
23
     */
24 9
    public function getFriends()
25
    {
26 9
        return $this->friends;
27
    }
28
29
    /**
30
     * @return string
31
     */
32 3
    public function __toString()
33
    {
34 3
        return 'Friends List';
35
    }
36
37
    /**
38
     * Static constructor.
39
     *
40
     * @param int[] $friends
41
     *
42
     * @return TwitterFriends
43
     */
44 9
    public static function create(array $friends = [])
45
    {
46 9
        $obj = new self();
47
48 9
        $obj->friends = $friends;
49
50 9
        return $obj;
51
    }
52
}
53