Dispatcher::sendNow()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
1
<?php namespace nyx\notify\interfaces;
2
3
/**
4
 * Notification Dispatcher Interface
5
 *
6
 * @package     Nyx\Notify
7
 * @version     0.1.0
8
 * @author      Michal Chojnacki <[email protected]>
9
 * @copyright   2012-2017 Nyx Dev Team
10
 * @link        https://github.com/unyx/nyx
11
 */
12
interface Dispatcher
13
{
14
    /**
15
     * Sends the given Notification to the given entities.
16
     *
17
     * @param   array|Notifiable    $notifiables    The entities which shall receive the Notification (single Notifiable
18
     *                                              or an iterable collection thereof).
19
     * @param   Notification        $notification   The Notification that shall be sent.
20
     */
21
    public function send($notifiables, Notification $notification);
0 ignored issues
show
Documentation introduced by
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...
22
23
    /**
24
     * Sends the given Notification synchronously to the given entities.
25
     *
26
     * @param   array|Notifiable    $notifiables    The entities which shall receive the Notification (single Notifiable
27
     *                                              or an iterable collection thereof).
28
     * @param   Notification        $notification   The Notification that shall be sent.
29
     */
30
    public function sendNow($notifiables, Notification $notification);
0 ignored issues
show
Documentation introduced by
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...
31
}
32