@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace PeeHaa\AsyncTwitter\Request; |
4 | 4 | |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | public function __construct(string $key, string $type = 'text/plain') |
12 | 12 | { |
13 | - $this->key = $key; |
|
13 | + $this->key = $key; |
|
14 | 14 | $this->type = $type; |
15 | 15 | } |
16 | 16 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | foreach ($userIds as $id) { |
27 | - if (!\ctype_digit((string)$id)) { |
|
27 | + if (!\ctype_digit((string) $id)) { |
|
28 | 28 | throw new Exception('User IDs must be numeric'); |
29 | 29 | } |
30 | 30 | } |
@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | public function handleResponse(array $responseData) |
49 | 49 | { |
50 | 50 | $mediaId = $responseData['media_id_string'] ?? ''; |
51 | - $size = (int)($responseData['size'] ?? 0); |
|
51 | + $size = (int) ($responseData['size'] ?? 0); |
|
52 | 52 | $expiryTime = new \DateTimeImmutable('@' . (time() + ($responseData['expires_after_secs'] ?? 0))); |
53 | 53 | $mimeType = $responseData['image']['image_type'] ?? ''; |
54 | - $width = (int)($responseData['image']['w'] ?? 0); |
|
55 | - $height = (int)($responseData['image']['h'] ?? 0); |
|
54 | + $width = (int) ($responseData['image']['w'] ?? 0); |
|
55 | + $height = (int) ($responseData['image']['h'] ?? 0); |
|
56 | 56 | |
57 | 57 | return new UploadResponse($mediaId, $size, $expiryTime, $mimeType, $width, $height); |
58 | 58 | } |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace PeeHaa\AsyncTwitter\Examples; |
4 | 4 |