GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

StreamFeed::getEntries()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 9.6666
cc 1
eloc 5
nc 1
nop 0
crap 1
1
<?php
2
namespace EventStore\StreamFeed;
3
4
/**
5
 * Class StreamFeed
6
 * @package EventStore\StreamFeed
7
 */
8
final class StreamFeed
9
{
10
    use HasLinks;
11
12
    /**
13
     * @var array
14
     */
15
    private $json;
16
17
    /**
18
     * @var EntryEmbedMode
19
     */
20
    private $entryEmbedMode;
21
22
    /**
23
     * @param array          $jsonFeed
24
     * @param EntryEmbedMode $embedMode
25
     */
26 26
    public function __construct(array $jsonFeed, EntryEmbedMode $embedMode = null)
27
    {
28 26
        if ($embedMode === null) {
29 22
            $embedMode = EntryEmbedMode::NONE();
30
        }
31
32 26
        $this->entryEmbedMode = $embedMode;
33 26
        $this->json           = $jsonFeed;
34 26
    }
35
36
    /**
37
     * @return Entry[]
38
     */
39 13
    public function getEntries()
40
    {
41 13
        return array_map(
42 13
            function (array $jsonEntry) {
43 13
                return new Entry($jsonEntry);
44 13
            },
45 13
            $this->json['entries']
46
        );
47
    }
48
49
    /**
50
     * @return EntryEmbedMode
51
     */
52 12
    public function getEntryEmbedMode()
53
    {
54 12
        return $this->entryEmbedMode;
55
    }
56
57
    /**
58
     * @return array
59
     */
60 3
    public function getJson()
61
    {
62 3
        return $this->json;
63
    }
64
65
    /**
66
     * @return array
67
     */
68 14
    protected function getLinks()
69
    {
70 14
        return $this->json['links'];
71
    }
72
}
73