UnreadCount::unreadCounts()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 4
c 0
b 0
f 0
nc 2
nop 0
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ExileeD\Inoreader\Objects;
6
7
class UnreadCount extends AbstractObject implements ObjectInterface
8
{
9
10 3
    public function max(): int
11
    {
12 3
        return $this->data->max;
13
    }
14
15
    /**
16
     * @return SingleUnreadCount[]
17
     */
18 3
    public function unreadCounts(): array
19
    {
20 3
        $counts = [];
21 3
        foreach ($this->data->unreadcounts as $count) {
22 3
            $counts[] = new SingleUnreadCount($count);
23
        }
24 3
        return $counts;
25
    }
26
}
27