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