| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare (strict_types = 1); |
||
| 26 | interface JsonApiDataParserInterface |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * @param array $jsonData |
||
| 30 | * |
||
| 31 | * @return bool |
||
| 32 | */ |
||
| 33 | public function parse(array $jsonData): bool; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param array $jsonData |
||
| 37 | * |
||
| 38 | * @return self |
||
|
|
|||
| 39 | */ |
||
| 40 | public function assert(array $jsonData): self; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string $index |
||
| 44 | * @param string $name |
||
| 45 | * @param array $jsonData |
||
| 46 | * |
||
| 47 | * @return bool |
||
| 48 | */ |
||
| 49 | public function parseRelationship(string $index, string $name, array $jsonData): bool; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $index |
||
| 53 | * @param string $name |
||
| 54 | * @param array $jsonData |
||
| 55 | * |
||
| 56 | * @return self |
||
| 57 | */ |
||
| 58 | public function assertRelationship(string $index, string $name, array $jsonData): self; |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return array |
||
| 62 | */ |
||
| 63 | public function getCaptures(): array; |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return ErrorInterface[] |
||
| 67 | */ |
||
| 68 | public function getErrors(): array; |
||
| 69 | } |
||
| 70 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.