Completed
Pull Request — master (#42)
by Daniel
10:35 queued 08:29
created

QueryMetadata   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 40
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 1
A getName() 0 4 1
A getSelects() 0 4 1
A getJoins() 0 4 1
A getCriteria() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Psi\Component\Grid\Metadata;
6
7
final class QueryMetadata
8
{
9
    private $name;
10
    private $selects;
11
    private $joins;
12
    private $criteria;
13
14
    public function __construct(
15
        string $name,
16
        array $selects = [],
17
        array $joins = [],
18
        array $criteria = []
19
    )
20
    {
21
        $this->name = $name;
22
        $this->selects = $selects;
23
        $this->joins = $joins;
24
        $this->criteria = $criteria;
25
    }
26
27
    public function getName() 
28
    {
29
        return $this->name;
30
    }
31
32
    public function getSelects(): array
33
    {
34
        return $this->selects;
35
    }
36
37
    public function getJoins(): array
38
    {
39
        return $this->joins;
40
    }
41
42
    public function getCriteria(): array
43
    {
44
        return $this->criteria;
45
    }
46
}
47