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

Group   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
c 0
b 0
f 0
dl 0
loc 21
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getFilters() 0 3 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