Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | 38 | public function transform( string $segment ): string { |
|
25 | |||
26 | //normal control characters must be converted to entities |
||
27 | 38 | $segment = str_replace( |
|
28 | 38 | [ "\r\n", "\r", "\n", "\t", "", ], |
|
29 | 38 | [ |
|
30 | 38 | ' ', |
|
31 | 38 | ' ', |
|
32 | 38 | ' ', |
|
33 | 38 | '	', |
|
34 | 38 | '', |
|
35 | 38 | ], $segment ); |
|
36 | |||
37 | // now convert the real |
||
38 | 38 | return str_replace( ConstantEnum::nbspPlaceholder, Utils::unicode2chr( 0Xa0 ), $segment ); |
|
39 | |||
42 | } |