Conditions | 2 |
Paths | 1 |
Total Lines | 22 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | 3 | public function create(Composer $composer): SymbolFilterInterface |
|
21 | { |
||
22 | /** @var SymbolFilterInterface[] $filters */ |
||
23 | 3 | $filters = array_map( |
|
24 | function (string $exclusion) : SymbolFilterInterface { |
||
25 | $filters = [ |
||
26 | 1 | new ExactSymbolFilter($exclusion), |
|
27 | 1 | new PatternSymbolFilter($exclusion) |
|
28 | ]; |
||
29 | |||
30 | 1 | if (preg_match('#\\\\$#', $exclusion)) { |
|
31 | 1 | $filters[] = new NamespaceSymbolFilter($exclusion); |
|
32 | } |
||
33 | |||
34 | 1 | return new SymbolFilterChain(...$filters); |
|
35 | 3 | }, |
|
36 | 3 | $this->getExclusions($composer) |
|
37 | ); |
||
38 | |||
39 | 3 | $filters[] = new UserDefinedSymbolFilter(); |
|
40 | |||
41 | 3 | return new SymbolFilterChain(...$filters); |
|
42 | } |
||
58 |