TwitterFriends::getFriends()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 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