1 | <?php |
||
19 | class YamlContent extends Content implements ContentInterface |
||
20 | { |
||
21 | /** |
||
22 | * Return the content as an array |
||
23 | * |
||
24 | * @return array |
||
|
|||
25 | * @throws \NeedleProject\FileIo\Exception\ContentException |
||
26 | */ |
||
27 | 2 | public function getArray() |
|
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | * @return \stdClass |
||
44 | */ |
||
45 | 1 | public function getObject() |
|
49 | } |
||
50 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.If the return type contains the type array, this check recommends the use of a more specific type like
String[]
orarray<String>
.