| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 3 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 50 | 5 | public function filter($value) |
|
| 51 | { |
||
| 52 | 5 | if ($this->toEncoding === null) { |
|
| 53 | 1 | return $value; |
|
| 54 | } |
||
| 55 | |||
| 56 | 4 | if ($this->fromEncoding === null) { |
|
| 57 | 2 | return mb_convert_encoding($value, $this->toEncoding); |
|
| 58 | } |
||
| 59 | |||
| 60 | 2 | return mb_convert_encoding($value, $this->toEncoding, $this->fromEncoding); |
|
| 61 | } |
||
| 62 | } |
||
| 63 |