1 | <?php |
||
7 | class PushNotification implements PushNotificationInterface, LifeCycleCallback |
||
8 | { |
||
9 | /** |
||
10 | * @var PushNotificationInterface[] |
||
11 | */ |
||
12 | private $notificationImpl = array(); |
||
13 | |||
14 | /** |
||
15 | * PushNotification constructor. |
||
16 | * |
||
17 | * @param array $config Configuration for notification implementations. |
||
18 | * |
||
19 | * Available keys. |
||
20 | * - skipApns Whether use APNS notifications. |
||
21 | * - skipGcm Whether use GCM notifications |
||
22 | * - apns |
||
23 | * - live |
||
24 | * - cert |
||
25 | * - sandboxCert |
||
26 | * - gcm |
||
27 | * - apiKey Google Api key for GCM service. |
||
28 | */ |
||
29 | 3 | public function __construct($config = array()) |
|
36 | |||
37 | /** |
||
38 | * @param $config |
||
39 | */ |
||
40 | 3 | private function initApns($config) |
|
51 | |||
52 | /** |
||
53 | * @param $config |
||
54 | */ |
||
55 | 2 | private function initGcm($config) |
|
64 | |||
65 | /** |
||
66 | * |
||
67 | */ |
||
68 | public function send() |
||
72 | |||
73 | private function invokeMethod($method, $args = array()) |
||
79 | |||
80 | public function enqueue(MessageInterface $message) |
||
88 | |||
89 | public function setStreamWrapper(Connection $wrapper) |
||
93 | |||
94 | public function onComplete(callable $param) |
||
98 | |||
99 | /** |
||
100 | * Will be called when the every message was sent. |
||
101 | * |
||
102 | * @param callable $callback |
||
103 | */ |
||
104 | public function onEachSent(callable $callback) |
||
108 | |||
109 | /** |
||
110 | * Removes all callbacks. |
||
111 | */ |
||
112 | public function detach() |
||
116 | |||
117 | /** |
||
118 | * @param int $count |
||
119 | */ |
||
120 | public function setRetryCount($count) |
||
124 | } |
||
125 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.