| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace nyx\notify\interfaces; |
||
| 12 | interface Notifiable |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Notifies the underlying entity with the given Notification. |
||
| 16 | * |
||
| 17 | * @param Notification $notification |
||
| 18 | */ |
||
| 19 | public function notify(Notification $notification); |
||
| 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); |
||
| 30 | } |
||
| 31 |
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.