| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 4 | protected function transform($key, $value) |
|
| 26 | { |
||
| 27 | 4 | if ((! is_string($value)) || in_array($key, $this->except, true)) { |
|
| 28 | 2 | return $value; |
|
| 29 | } |
||
| 30 | |||
| 31 | 4 | $eastern = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩']; |
|
| 32 | 4 | $western = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; |
|
| 33 | 4 | return str_replace($eastern, $western, $value); |
|
| 34 | 4 | } |
|
| 36 |