StreamContents   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Test Coverage

Coverage 90.48%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 55
ccs 19
cts 21
cp 0.9048
rs 10
wmc 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A direction() 0 3 1
A id() 0 3 1
A title() 0 3 1
A continuation() 0 3 1
A updated() 0 3 1
A items() 0 9 2
A self() 0 3 1
A updatedUsec() 0 3 1
A description() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ExileeD\Inoreader\Objects;
6
7
class StreamContents extends AbstractObject implements ObjectInterface
8
{
9
10 3
    public function direction(): string
11
    {
12 3
        return $this->data->direction;
13
    }
14
15 3
    public function id(): string
16
    {
17 3
        return $this->data->id;
18
    }
19
20 3
    public function title(): string
21
    {
22 3
        return $this->data->title;
23
    }
24
25
    public function description(): string
26
    {
27
        return $this->data->description;
28
    }
29
30 3
    public function self(): ItemSelf
31
    {
32 3
        return new ItemSelf($this->data->self);
33
    }
34
35 3
    public function updated(): int
36
    {
37 3
        return $this->data->updated;
38
    }
39
40 3
    public function updatedUsec(): string
41
    {
42 3
        return $this->data->updatedUsec;
43
    }
44
45 3
    public function continuation(): ?string
46
    {
47 3
        return $this->data->continuation ?? null;
48
    }
49
50
    /**
51
     * @return Item[]
52
     */
53 3
    public function items(): array
54
    {
55
56 3
        $items = [];
57 3
        foreach ($this->data->items as $item) {
58 3
            $items[] = new Item($item);
59
        }
60
61 3
        return $items;
62
    }
63
}
64