| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class NullMapper implements IMapper |
||
| 11 | { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Convert array or Traversable input to string output response |
||
| 15 | * @param string|object|iterable<string|int, mixed> $data |
||
| 16 | * @param bool $prettyPrint |
||
| 17 | * @return string |
||
| 18 | */ |
||
| 19 | public function stringify(iterable|string|object $data, bool $prettyPrint = true): string |
||
| 20 | { |
||
| 21 | return ''; |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Convert client request data to array or traversable |
||
| 26 | * @param mixed $data |
||
| 27 | * @return array<string|int, mixed> |
||
| 28 | */ |
||
| 29 | public function parse(mixed $data): array |
||
| 32 | } |
||
| 33 | } |
||
| 34 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: