1 | <?php |
||
23 | class Response implements ResponseInterface |
||
24 | { |
||
25 | const REQUEST_HAS_SUCCEED_CODE = 200; |
||
26 | const MALFORMED_NOTIFICATION_CODE = 400; |
||
27 | const AUTHENTICATION_ERROR_CODE = 401; |
||
28 | |||
29 | /** |
||
30 | * @var \Buzz\Message\Response |
||
31 | */ |
||
32 | protected $response; |
||
33 | |||
34 | /** |
||
35 | * @var \ArrayIterator |
||
36 | */ |
||
37 | protected $recipients; |
||
38 | |||
39 | /** |
||
40 | * @param \Buzz\Message\Response $response |
||
41 | * @param \ArrayIterator $recipients |
||
42 | */ |
||
43 | public function __construct(\Buzz\Message\Response $response, \ArrayIterator $recipients) |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public function processResponse() |
||
65 | |||
66 | /** |
||
67 | * @param string $json |
||
68 | * @return \stdClass |
||
69 | */ |
||
70 | public function decodeMessage($json) |
||
80 | |||
81 | /** |
||
82 | * Checks if response has succeed code or request was rejected |
||
83 | * |
||
84 | * @param int $responseCode |
||
85 | * @throws MalformedNotificationException |
||
86 | * @throws DispatchMessageException |
||
87 | * @throws RuntimeException |
||
88 | */ |
||
89 | private function checkResponseCode($responseCode) |
||
113 | |||
114 | /** |
||
115 | * Checks message status |
||
116 | * |
||
117 | * @param \stdClass $message |
||
118 | */ |
||
119 | private function checkMessageStatus($message) |
||
127 | |||
128 | /** |
||
129 | * Check message result |
||
130 | * |
||
131 | * @param \stdClass $message |
||
132 | * @param \ArrayIterator $recipients |
||
133 | */ |
||
134 | private function checkMessageResult($message, \ArrayIterator $recipients) |
||
157 | |||
158 | /** |
||
159 | * @param string $error |
||
160 | * @param RecipientDevice $recipient |
||
161 | * @return RecipientDevice |
||
162 | */ |
||
163 | private function processError($error, RecipientDevice $recipient) |
||
181 | } |
||
182 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.