1 | <?php |
||
11 | abstract class AbstractProvider |
||
12 | { |
||
13 | const NAME = null; |
||
14 | |||
15 | /** |
||
16 | * @var Project |
||
17 | */ |
||
18 | protected $project; |
||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $config = []; |
||
23 | /** |
||
24 | * @var Client |
||
25 | */ |
||
26 | protected static $browser; |
||
27 | |||
28 | /** |
||
29 | * Create a new Provider. |
||
30 | * |
||
31 | * @param array $config |
||
32 | */ |
||
33 | 16 | public function __construct(array $config = []) |
|
37 | |||
38 | /** |
||
39 | * Set project. |
||
40 | * |
||
41 | * @param Project $project |
||
42 | * @return $this |
||
43 | */ |
||
44 | 15 | public function setProject(Project $project) |
|
50 | |||
51 | /** |
||
52 | * Send notification. |
||
53 | * |
||
54 | * @param Notification $notification |
||
55 | * @param Subscriber[] $subscribers |
||
56 | */ |
||
57 | abstract public function send(Notification $notification, array $subscribers); |
||
58 | |||
59 | /** |
||
60 | * Send request. |
||
61 | * |
||
62 | * @param array $subscribers |
||
63 | * @param mixed $payload |
||
64 | * @return \Generator |
||
65 | */ |
||
66 | abstract protected function prepareRequests($subscribers, $payload = null); |
||
67 | |||
68 | /** |
||
69 | * Send data to provider. |
||
70 | * |
||
71 | * @param array $subscribers |
||
72 | * @param \Closure $success |
||
73 | * @param \Closure $fail |
||
74 | */ |
||
75 | 2 | protected function flush(array $subscribers, \Closure $success = null, \Closure $fail = null) |
|
96 | } |
||
97 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.