Request   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
eloc 18
c 1
b 0
f 0
dl 0
loc 53
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getDraw() 0 3 1
A __construct() 0 8 1
A getColumns() 0 3 1
A getLength() 0 3 1
A getStart() 0 3 1
A getOrder() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace WebServCo\Framework\DataTables;
6
7
use WebServCo\Framework\ArrayObject\Items;
8
use WebServCo\Framework\Interfaces\ArrayObjectInterface;
9
10
class Request
11
{
12
    protected int $draw;
13
14
    protected Items $columns;
15
16
    protected Items $order;
17
18
    protected int $start;
19
20
    protected int $length;
21
22
    protected Search $search;
23
24
    public function __construct(int $draw, Items $columns, Items $order, int $start, int $length, Search $search)
25
    {
26
        $this->draw = $draw;
27
        $this->columns = $columns;
28
        $this->order = $order;
29
        $this->start = $start;
30
        $this->length = $length;
31
        $this->search = $search;
32
    }
33
34
    /**
35
    * @return \WebServCo\Framework\Interfaces\ArrayObjectInterface<\WebServCo\Framework\DataTables\ColumnArrayObject>
36
    */
37
    public function getColumns(): ArrayObjectInterface
38
    {
39
        return $this->columns->getArrayObject();
40
    }
41
42
    public function getDraw(): int
43
    {
44
        return $this->draw;
45
    }
46
47
    public function getLength(): int
48
    {
49
        return $this->length;
50
    }
51
52
    /**
53
    * @return \WebServCo\Framework\Interfaces\ArrayObjectInterface<\WebServCo\Framework\DataTables\OrderArrayObject>
54
    */
55
    public function getOrder(): ArrayObjectInterface
56
    {
57
        return $this->order->getArrayObject();
58
    }
59
60
    public function getStart(): int
61
    {
62
        return $this->start;
63
    }
64
}
65