Test Setup Failed
Push — master ( aeb8b5...c4a9e3 )
by Alexpts
07:44
created

RegExpFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 9
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace PTS\Tools;
5
6
class RegExpFactory
7
{
8 1
    public function create(string $pattern, string $replacement = ''): callable
9
    {
10
        return static fn ($value): string => preg_replace($pattern, $replacement, $value);
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_PAAMAYIM_NEKUDOTAYIM
Loading history...
11 1
    }
12
}
13