1 | <?php |
||
14 | trait RelatedLinkTrait |
||
15 | { |
||
16 | abstract public function setLink($key, $value); |
||
18 | |||
19 | /** |
||
20 | * Set the related link. |
||
21 | * |
||
22 | * @param string|Link $value |
||
23 | */ |
||
24 | public function setRelatedLink($value) |
||
28 | |||
29 | /** |
||
30 | * Remove the related link. |
||
31 | */ |
||
32 | public function removeRelatedLink() |
||
36 | } |
||
37 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@return
doc comment to communicate to implementors of these methods what they are expected to return.