| Total Complexity | 8 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class StringElement extends LeafElement |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * {@inheritdoc} |
||
| 19 | */ |
||
| 20 | 185 | protected function toPhp($httpValue): ?string |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * {@inheritdoc} |
||
| 31 | */ |
||
| 32 | 37 | protected function toHttp($phpValue): ?string |
|
| 33 | { |
||
| 34 | 37 | return $phpValue; |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | 81 | protected function tryCast($value): ?string |
|
| 51 | } |
||
| 52 | } |
||
| 53 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: