For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.
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.
Loading history...
20
21
/**
22
* Returns data necessary for the specified Transport to route a constructed notification message
23
* to the underlying entity, granting the Notifiable the ability to modify the message before delivery.
24
*
25
* @param string $transport The name of the Transport to return metadata for.
26
* @param object $message The notification message being routed.
27
* @return mixed
28
*/
29
public function routeNotification(string $transport, $message);
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.