| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | 2 | public function cleanXML($file) |
|
| 52 | { |
||
| 53 | 2 | $str = file_get_contents($file); |
|
| 54 | 2 | $re = '/(^\s*\#.*?(?=-))(-{2,})/m'; |
|
| 55 | 2 | preg_match($re, $str, $matches); |
|
| 56 | |||
| 57 | 2 | $newStr = str_replace('-', '=', $matches[2]); |
|
| 58 | 2 | $str = preg_replace($re, '$1' . $newStr, $str); |
|
| 59 | |||
| 60 | 2 | file_put_contents($file, $str); |
|
| 61 | 1 | } |
|
| 63 |