1 | <?php |
||
8 | class PushNotification implements PushNotificationInterface, LifeCycleCallback |
||
9 | { |
||
10 | /** |
||
11 | * @var PushNotificationInterface[] |
||
12 | */ |
||
13 | private $notificationImpl = array(); |
||
14 | |||
15 | /** |
||
16 | * PushNotification constructor. |
||
17 | * |
||
18 | * @param array $config Configuration for notification implementations. |
||
19 | * |
||
20 | * Available keys. |
||
21 | * - skipApns Whether use APNS notifications. |
||
22 | * - skipGcm Whether use GCM notifications |
||
23 | * - apns |
||
24 | * - live |
||
25 | * - cert |
||
26 | * - sandboxCert |
||
27 | * - gcm |
||
28 | * - apiKey Google Api key for GCM service. |
||
29 | */ |
||
30 | 3 | public function __construct($config = array()) |
|
37 | |||
38 | /** |
||
39 | * @param $config |
||
40 | */ |
||
41 | 3 | private function initApns($config) |
|
52 | |||
53 | /** |
||
54 | * @param $config |
||
55 | */ |
||
56 | 2 | private function initGcm($config) |
|
65 | |||
66 | /** |
||
67 | * |
||
68 | */ |
||
69 | public function send() |
||
73 | |||
74 | private function invokeMethod($method, $args = array()) |
||
80 | |||
81 | public function enqueue(MessageInterface $message) |
||
89 | |||
90 | public function setStreamWrapper(Connection $wrapper) |
||
94 | |||
95 | /** |
||
96 | * @inheritdoc |
||
97 | */ |
||
98 | public function onComplete(\Closure $param) |
||
102 | |||
103 | /** |
||
104 | * @inheritdoc |
||
105 | */ |
||
106 | public function onEachSent(\Closure $callback) |
||
110 | |||
111 | /** |
||
112 | * Removes all callbacks. |
||
113 | */ |
||
114 | public function detach() |
||
118 | |||
119 | /** |
||
120 | * @param int $count |
||
121 | */ |
||
122 | public function setRetryCount($count) |
||
126 | |||
127 | /** |
||
128 | * @inheritdoc |
||
129 | */ |
||
130 | public function onError(Closure $callback) |
||
134 | } |
||
135 |
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.