| 1 | <?php |
||
| 7 | final class UrlEncodedDecoderType implements DecoderTypeInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @return string |
||
| 11 | */ |
||
| 12 | public function getContentType(): string |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param string $data |
||
| 19 | * |
||
| 20 | * @return array |
||
| 21 | * |
||
| 22 | * @throws DecoderException |
||
| 23 | */ |
||
| 24 | public function decode(string $data): array |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param array $rawData |
||
| 38 | * |
||
| 39 | * @return array |
||
| 40 | */ |
||
| 41 | private function cleanRawData(array $rawData): array |
||
| 66 | } |
||
| 67 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.