@@ -9,4 +9,4 @@ |
||
9 | 9 | |
10 | 10 | session_start(); |
11 | 11 | |
12 | -require_once dirname(__DIR__) . '/vendor/autoload.php'; |
|
12 | +require_once dirname(__DIR__).'/vendor/autoload.php'; |
@@ -171,7 +171,7 @@ |
||
171 | 171 | /** |
172 | 172 | * Retrieve result status message. |
173 | 173 | * |
174 | - * @return string|null |
|
174 | + * @return string |
|
175 | 175 | */ |
176 | 176 | public function getStatusMessage() |
177 | 177 | { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function testPushClient() |
41 | 41 | { |
42 | - $client = $this->builder->buildPushClient(__DIR__ . '/../../../files/apns_certificate.pem'); |
|
42 | + $client = $this->builder->buildPushClient(__DIR__.'/../../../files/apns_certificate.pem'); |
|
43 | 43 | |
44 | 44 | self::assertInstanceOf(MessageClient::class, $client); |
45 | 45 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function testFeedbackClient() |
53 | 53 | { |
54 | - $client = $this->builder->buildFeedbackClient(__DIR__ . '/../../../files/apns_certificate.pem'); |
|
54 | + $client = $this->builder->buildFeedbackClient(__DIR__.'/../../../files/apns_certificate.pem'); |
|
55 | 55 | |
56 | 56 | self::assertInstanceOf(FeedbackClient::class, $client); |
57 | 57 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $builder->expects(self::any())->method('buildPushMessage')->will(self::returnValue($message)); |
54 | 54 | |
55 | 55 | $this->adapter = new ApnsAdapter( |
56 | - ['certificate' => __DIR__ . '/../../../files/apns_certificate.pem'], |
|
56 | + ['certificate' => __DIR__.'/../../../files/apns_certificate.pem'], |
|
57 | 57 | false, |
58 | 58 | $builder |
59 | 59 | ); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | /** @var \Jgut\Tify\Adapter\PushAdapter[] $pushAdapters */ |
173 | 173 | $pushAdapters = array_filter( |
174 | 174 | $this->adapters->toArray(), |
175 | - function (AbstractAdapter $adapter) { |
|
175 | + function(AbstractAdapter $adapter) { |
|
176 | 176 | return $adapter instanceof PushAdapter; |
177 | 177 | } |
178 | 178 | ); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | /** @var \Jgut\Tify\Adapter\FeedbackAdapter[] $feedbackAdapters */ |
201 | 201 | $feedbackAdapters = array_filter( |
202 | 202 | $this->adapters->toArray(), |
203 | - function (AbstractAdapter $adapter) { |
|
203 | + function(AbstractAdapter $adapter) { |
|
204 | 204 | return $adapter instanceof FeedbackAdapter; |
205 | 205 | } |
206 | 206 | ); |
@@ -253,6 +253,6 @@ |
||
253 | 253 | throw new \InvalidArgumentException('Payload parameter key can not be empty'); |
254 | 254 | } |
255 | 255 | |
256 | - return $this->payloadPrefix . $key; |
|
256 | + return $this->payloadPrefix.$key; |
|
257 | 257 | } |
258 | 258 | } |
@@ -164,7 +164,7 @@ |
||
164 | 164 | { |
165 | 165 | foreach (array_chunk($notification->getReceivers(), 100) as $receivers) { |
166 | 166 | $tokens = array_map( |
167 | - function ($receiver) { |
|
167 | + function($receiver) { |
|
168 | 168 | return $receiver instanceof GcmReceiver ? $receiver->getToken() : null; |
169 | 169 | }, |
170 | 170 | $receivers |
@@ -258,7 +258,7 @@ |
||
258 | 258 | * |
259 | 259 | * @param \ZendService\Apple\Exception\RuntimeException $exception |
260 | 260 | * |
261 | - * @return string |
|
261 | + * @return integer |
|
262 | 262 | */ |
263 | 263 | protected function getErrorCodeFromException(ApnsRuntimeException $exception) |
264 | 264 | { |
@@ -9,10 +9,10 @@ |
||
9 | 9 | |
10 | 10 | namespace Jgut\Tify\Service\Message; |
11 | 11 | |
12 | -use Zend\Json\Json; |
|
13 | 12 | use ZendService\Google\Exception\InvalidArgumentException; |
14 | 13 | use ZendService\Google\Exception\RuntimeException; |
15 | 14 | use ZendService\Google\Gcm\Message as ServiceMessage; |
15 | +use Zend\Json\Json; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Custom GCM service message. |