Passed
Push — master ( 8f1d03...3f48a5 )
by Bingo
02:51
created

RegExp   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
ccs 0
cts 3
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A escapeSingleValue() 0 3 1
1
<?php
2
3
namespace PhpDocxTemplate\Escaper;
4
5
class RegExp extends AbstractEscaper
6
{
7
    private const REG_EXP_DELIMITER = '/';
8
9
    protected function escapeSingleValue(string $input): string
10
    {
11
        return self::REG_EXP_DELIMITER . preg_quote($input, self::REG_EXP_DELIMITER) . self::REG_EXP_DELIMITER . 'u';
12
    }
13
}
14