Conditions | 2 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
29 | protected function getMatchFormatter($linkIdx = 1, $labelIdx = 2) |
||
30 | { |
||
31 | 3 | return function (array $matches) use ($linkIdx, $labelIdx) { |
|
32 | 3 | $out = '<'; |
|
33 | 3 | $out .= $matches[$linkIdx]; |
|
34 | 3 | if (!empty($matches[$labelIdx])) { |
|
35 | 2 | $out .= '|'.$matches[$labelIdx]; |
|
36 | 2 | } |
|
37 | 3 | $out .= '>'; |
|
38 | |||
39 | 3 | return $out; |
|
40 | 3 | }; |
|
41 | } |
||
42 | } |
||
43 |