AbstractPaginatedResponse::setTotal()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

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