AbstractPaginatedResponse   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 34
ccs 6
cts 6
cp 1
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A setTotal() 0 3 1
A getLimit() 0 3 1
A setLimit() 0 3 1
A getData() 0 3 1
A getTotal() 0 3 1
A setData() 0 3 1
1
<?php
2
3
namespace MediaMonks\RestApi\Response;
4
5
abstract class AbstractPaginatedResponse
6
{
7
    public function __construct(protected mixed $data, protected int $limit, protected ?int $total = null)
8
    {
9
    }
10
11
    public function getData(): mixed
12
    {
13
        return $this->data;
14
    }
15
16
    public function setData(mixed $data): void
17
    {
18
        $this->data = $data;
19
    }
20
21
    public function getLimit(): int
22
    {
23
        return $this->limit;
24
    }
25
26
    public function setLimit(int $limit): void
27
    {
28 10
        $this->limit = $limit;
29
    }
30 10
31 10
    public function getTotal(): ?int
32 10
    {
33 10
        return $this->total;
34
    }
35
36
    public function setTotal(?int $total): void
37
    {
38 6
        $this->total = $total;
39
    }
40
}
41