@@ -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 | /** |
@@ -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 | } |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | */ |
| 293 | 293 | public function setAPSCategory($category) |
| 294 | 294 | { |
| 295 | - $this->apsBody['aps']['category'] = (string) $category; |
|
| 295 | + $this->apsBody['aps']['category'] = (string)$category; |
|
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | /** |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | */ |
| 315 | 315 | public function setId($id) |
| 316 | 316 | { |
| 317 | - $this->id = (string) $id; |
|
| 317 | + $this->id = (string)$id; |
|
| 318 | 318 | |
| 319 | 319 | return $this; |
| 320 | 320 | } |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | */ |
| 339 | 339 | public function setExpiry($expiry) |
| 340 | 340 | { |
| 341 | - $this->expiry = (int) $expiry; |
|
| 341 | + $this->expiry = (int)$expiry; |
|
| 342 | 342 | |
| 343 | 343 | return $this; |
| 344 | 344 | } |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | */ |
| 359 | 359 | public function setPriority($priority) |
| 360 | 360 | { |
| 361 | - $this->priority = (int) $priority; |
|
| 361 | + $this->priority = (int)$priority; |
|
| 362 | 362 | |
| 363 | 363 | return $this; |
| 364 | 364 | } |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | */ |
| 383 | 383 | public function setTopic($topic) |
| 384 | 384 | { |
| 385 | - $this->topic = (string) $topic; |
|
| 385 | + $this->topic = (string)$topic; |
|
| 386 | 386 | |
| 387 | 387 | return $this; |
| 388 | 388 | } |
@@ -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 | { |