Passed
Push — main ( da4717...a4cd91 )
by Thierry
01:42
created

TableSelectEntity   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 15
c 1
b 0
f 0
dl 0
loc 72
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
namespace Lagdo\DbAdmin\Driver\Entity;
4
5
class TableSelectEntity
6
{
7
    /**
8
     * The table name
9
     *
10
     * @var string
11
     */
12
    public $table = '';
13
14
    /**
15
     * The fields to select
16
     *
17
     * @var array
18
     */
19
    public $fields = [];
20
21
    /**
22
     * The where clauses
23
     *
24
     * @var array
25
     */
26
    public $where = [];
27
28
    /**
29
     * The group by clauses
30
     *
31
     * @var array
32
     */
33
    public $group = [];
34
35
    /**
36
     * The order by clauses
37
     *
38
     * @var array
39
     */
40
    public $order = [];
41
42
    /**
43
     * The row limit
44
     *
45
     * @var int
46
     */
47
    public $limit = 1;
48
49
    /**
50
     * The page number
51
     *
52
     * @var int
53
     */
54
    public $page = 0;
55
56
    /**
57
     * The constructor
58
     *
59
     * @param string $table
60
     * @param array $fields
61
     * @param array $where
62
     * @param array $group
63
     * @param array $order
64
     * @param int $limit
65
     * @param int $page
66
     */
67
    public function __construct(string $table, array $fields, array $where,
68
        array $group, array $order = [], int $limit = 1, int $page = 0)
69
    {
70
        $this->table = $table;
71
        $this->fields = $fields;
72
        $this->where = $where;
73
        $this->group = $group;
74
        $this->order = $order;
75
        $this->limit = $limit;
76
        $this->page = $page;
77
    }
78
}
79