| 1 | <?php |
||
| 7 | class AssociationPolymorphic extends Association |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var AssociationStubBase[] |
||
| 11 | */ |
||
| 12 | protected $last = []; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @return AssociationStubBase[] |
||
| 16 | */ |
||
| 17 | public function getLast() |
||
| 21 | |||
| 22 | public function setLast(array $stubs) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | public function isOk() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return AssociationType|AssociationType[] |
||
|
|
|||
| 53 | */ |
||
| 54 | public function getAssociationType() |
||
| 67 | |||
| 68 | private function isStubOk($stub) |
||
| 72 | } |
||
| 73 |
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.If the return type contains the type array, this check recommends the use of a more specific type like
String[]orarray<String>.