Completed
Pull Request — master (#42)
by Daniel
01:53
created

ClassMetadata::getQueries()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Psi\Component\Grid\Metadata;
6
7
use Metadata\MergeableClassMetadata;
8
9
final class ClassMetadata extends MergeableClassMetadata
10
{
11
    private $grids;
12
    private $queries;
13
14
    public function __construct($name, array $grids, array $queries = [])
15
    {
16
        parent::__construct($name);
17
18
        array_map(function (GridMetadata $grid) {
19
            $grid->attachClassMetadata($this);
20
        }, $grids);
21
        array_map(function (QueryMetadata $query) {
0 ignored issues
show
Unused Code introduced by
The parameter $query is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
22
        }, $queries);
23
24
        $this->grids = $grids;
25
        $this->queries = $queries;
26
    }
27
28
    public function getGrids(): array
29
    {
30
        return $this->grids;
31
    }
32
33
    public function getQueries()
34
    {
35
        return $this->queries;
36
    }
37
}
38