| 1 | <?php |
||
| 14 | trait SelfLinkTrait |
||
| 15 | { |
||
| 16 | abstract public function setLink($key, $value); |
||
| 17 | |||
| 18 | abstract public function removeLink($key); |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Set the self link. |
||
| 22 | * |
||
| 23 | * @param string|Link $value |
||
| 24 | */ |
||
| 25 | public function setSelfLink($value) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Remove the self link. |
||
| 32 | */ |
||
| 33 | public function removeSelfLink() |
||
| 37 | } |
||
| 38 |
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
@returndoc comment to communicate to implementors of these methods what they are expected to return.