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

ClassMetadata::getGrids()   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
use Psi\Component\Grid\Metadata\QueryMetadata;
9
use Psi\Component\Grid\Metadata\GridMetadata;
10
11
final class ClassMetadata extends MergeableClassMetadata
12
{
13
    private $grids;
14
    private $queries;
15
16
    public function __construct($name, array $grids, array $queries = [])
17
    {
18
        parent::__construct($name);
19
20
        array_map(function (GridMetadata $grid) {
21
            $grid->attachClassMetadata($this);
22
        }, $grids);
23
        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...
24
        }, $queries);
25
26
        $this->grids = $grids;
27
        $this->queries = $queries;
28
    }
29
30
    public function getGrids(): array
31
    {
32
        return $this->grids;
33
    }
34
35
    public function getQueries() 
36
    {
37
        return $this->queries;
38
    }
39
    
40
}
41