Completed
Push — master ( 4ff9cc...589f5d )
by Pavel
07:24
created

ChainCriteriaConfigurator::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace ScayTrase\Api\Cruds\Criteria;
4
5
use ScayTrase\Api\Cruds\CriteriaConfiguratorInterface;
6
7
final class ChainCriteriaConfigurator implements CriteriaConfiguratorInterface
8
{
9
    /** @var CriteriaConfiguratorInterface[] */
10
    private $filters = [];
11
12
    /**
13
     * ChainFilter constructor.
14
     *
15
     * @param CriteriaConfiguratorInterface[] $filters
16
     */
17
    public function __construct(array $filters)
18
    {
19
        $this->filters = $filters;
20
    }
21
22
    /** {@inheritdoc} */
23
    public function configure($fqcn, Criteria $criteria, $arguments)
24
    {
25
        foreach ($this->filters as $filter) {
26
            $filter->configure($fqcn, $arguments, $arguments);
27
        }
28
    }
29
}
30