Passed
Push — master ( f0feee...3c09de )
by Sergei
12:22
created

Group::getFilters()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Data\Reader\Filter;
6
7
use Yiisoft\Data\Reader\FilterInterface;
8
9
/**
10
 * `Group` filter is an abstract class that allows combining multiple sub-filters.
11
 */
12
abstract class Group implements FilterInterface
13
{
14
    /**
15
     * @var FilterInterface[] Sub-filters to use.
16
     */
17
    private array $filters;
18
19
    /**
20
     * @param FilterInterface ...$filters Sub-filters to use.
21
     */
22 17
    public function __construct(FilterInterface ...$filters)
23
    {
24 17
        $this->filters = $filters;
25
    }
26
27
    /**
28
     * @return FilterInterface[]
29
     */
30 17
    public function getFilters(): array
31
    {
32 17
        return $this->filters;
33
    }
34
}
35