| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 16 | public static function currencyStringToFloat($currencyString){ |
||
| 17 | //currency is always in this format € 550 |
||
| 18 | |||
| 19 | return floatval( |
||
| 20 | str_replace( |
||
| 21 | ',', |
||
| 22 | '', |
||
| 23 | RegExp::getFirstMatch( |
||
| 24 | '/([+-]?[0-9]{1,3}(?:,?[0-9]{3})*(?:\.[0-9]{2})?)/', |
||
| 25 | $currencyString |
||
| 26 | ) |
||
| 27 | ) |
||
| 28 | ); |
||
| 29 | } |
||
| 30 | |||
| 31 | } |