@@ -32,7 +32,7 @@ |
||
32 | 32 | { |
33 | 33 | parent::__construct($reason, $code, $previous); |
34 | 34 | |
35 | - $this->timestamp = (int) $timestamp; |
|
35 | + $this->timestamp = (int)$timestamp; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -17,7 +17,7 @@ |
||
17 | 17 | use GuzzleHttp\Client as HttpClient; |
18 | 18 | use GuzzleHttp\Exception\RequestException; |
19 | 19 | |
20 | -if (!defined('CURL_HTTP_VERSION_2_0')) { |
|
20 | +if ( ! defined('CURL_HTTP_VERSION_2_0')) { |
|
21 | 21 | define('CURL_HTTP_VERSION_2_0', 3); |
22 | 22 | } |
23 | 23 |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | { |
33 | 33 | $data = json_decode($responseContent, true); |
34 | 34 | |
35 | - if (!is_array($data)) { |
|
35 | + if ( ! is_array($data)) { |
|
36 | 36 | return new ApnsException( |
37 | 37 | sprintf('Unable to parse json `%s`: %s', json_last_error_msg(), $responseContent), |
38 | 38 | 0, |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | ); |
41 | 41 | } |
42 | 42 | |
43 | - $reason = isset($data['reason']) ? (string) $data['reason'] : ''; |
|
43 | + $reason = isset($data['reason']) ? (string)$data['reason'] : ''; |
|
44 | 44 | |
45 | 45 | switch ($statusCode) { |
46 | 46 | case 403: |
@@ -56,7 +56,7 @@ |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
59 | - * @return \PHPUnit_Framework_MockObject_MockObject |
|
59 | + * @return \PHPUnit\Framework\MockObject\MockObject |
|
60 | 60 | */ |
61 | 61 | private function getMockCallable() |
62 | 62 | { |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | { |
105 | 105 | $payloadBody = $this->apsBody; |
106 | 106 | |
107 | - if (!empty($this->customData)) { |
|
107 | + if ( ! empty($this->customData)) { |
|
108 | 108 | $payloadBody = array_merge($payloadBody, $this->customData); |
109 | 109 | } |
110 | 110 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | public function setAlert($alert) |
148 | 148 | { |
149 | - if (!is_string($alert) && !$alert instanceof MessageAlert) { |
|
149 | + if ( ! is_string($alert) && ! $alert instanceof MessageAlert) { |
|
150 | 150 | throw new \InvalidArgumentException( |
151 | 151 | sprintf( |
152 | 152 | 'Messages alert must be either string or instance of MessageAlert. Instance of "%s" provided', |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | } |
199 | 199 | |
200 | 200 | if (is_object($value)) { |
201 | - if (!$value instanceof \stdClass && !$value instanceof \JsonSerializable) { |
|
201 | + if ( ! $value instanceof \stdClass && ! $value instanceof \JsonSerializable) { |
|
202 | 202 | throw new \InvalidArgumentException(sprintf( |
203 | 203 | 'Object %s must be implements JsonSerializable interface for next serialize data.', |
204 | 204 | get_class($value) |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | */ |
246 | 246 | public function setAPSSound($sound) |
247 | 247 | { |
248 | - $this->apsBody['aps']['sound'] = (string) $sound; |
|
248 | + $this->apsBody['aps']['sound'] = (string)$sound; |
|
249 | 249 | |
250 | 250 | return $this; |
251 | 251 | } |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | */ |
261 | 261 | public function setAPSBadge($badge) |
262 | 262 | { |
263 | - $this->apsBody['aps']['badge'] = (int) $badge; |
|
263 | + $this->apsBody['aps']['badge'] = (int)$badge; |
|
264 | 264 | |
265 | 265 | return $this; |
266 | 266 | } |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | */ |
295 | 295 | public function setAPSCategory($category) |
296 | 296 | { |
297 | - $this->apsBody['aps']['category'] = (string) $category; |
|
297 | + $this->apsBody['aps']['category'] = (string)$category; |
|
298 | 298 | |
299 | 299 | return $this; |
300 | 300 | } |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | */ |
319 | 319 | public function setId($id) |
320 | 320 | { |
321 | - $this->id = (string) $id; |
|
321 | + $this->id = (string)$id; |
|
322 | 322 | |
323 | 323 | return $this; |
324 | 324 | } |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | */ |
343 | 343 | public function setExpiry($expiry) |
344 | 344 | { |
345 | - $this->expiry = (int) $expiry; |
|
345 | + $this->expiry = (int)$expiry; |
|
346 | 346 | |
347 | 347 | return $this; |
348 | 348 | } |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | */ |
363 | 363 | public function setPriority($priority) |
364 | 364 | { |
365 | - $this->priority = (int) $priority; |
|
365 | + $this->priority = (int)$priority; |
|
366 | 366 | |
367 | 367 | return $this; |
368 | 368 | } |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | */ |
387 | 387 | public function setTopic($topic) |
388 | 388 | { |
389 | - $this->topic = (string) $topic; |
|
389 | + $this->topic = (string)$topic; |
|
390 | 390 | |
391 | 391 | return $this; |
392 | 392 | } |