@@ -99,7 +99,7 @@ |
||
99 | 99 | * 429 Too Many Requests The skill has been throttled due to an excessive number of requests. |
100 | 100 | * 500 Internal Error An unexpected error occurred. |
101 | 101 | */ |
102 | - if(200 !== $response->getStatusCode()) { |
|
102 | + if (200 !== $response->getStatusCode()) { |
|
103 | 103 | throw new DeviceApiCallException(sprintf('Error in api call (status code:"%s")', $response->getStatusCode())); |
104 | 104 | } |
105 | 105 |
@@ -33,9 +33,9 @@ |
||
33 | 33 | { |
34 | 34 | $device = new self(); |
35 | 35 | |
36 | - $device->deviceId = PropertyHelper::checkNullValue($amazonRequest,'deviceId'); |
|
36 | + $device->deviceId = PropertyHelper::checkNullValue($amazonRequest, 'deviceId'); |
|
37 | 37 | $device->supportedInterfaces = isset($amazonRequest['supportedInterfaces']) ? (array) $amazonRequest['supportedInterfaces'] : []; |
38 | - $device->accessToken = PropertyHelper::checkNullValue($amazonRequest,'accessToken'); |
|
38 | + $device->accessToken = PropertyHelper::checkNullValue($amazonRequest, 'accessToken'); |
|
39 | 39 | |
40 | 40 | return $device; |
41 | 41 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $session = new self(); |
47 | 47 | |
48 | 48 | $session->new = isset($amazonRequest['new']) ? (bool) $amazonRequest['new'] : null; |
49 | - $session->sessionId = PropertyHelper::checkNullValue($amazonRequest,'sessionId'); |
|
49 | + $session->sessionId = PropertyHelper::checkNullValue($amazonRequest, 'sessionId'); |
|
50 | 50 | $session->application = isset($amazonRequest['application']) ? Application::fromAmazonRequest($amazonRequest['application']) : null; |
51 | 51 | $session->attributes = isset($amazonRequest['attributes']) ? (array) $amazonRequest['attributes'] : []; |
52 | 52 | $session->user = isset($amazonRequest['user']) ? User::fromAmazonRequest($amazonRequest['user']) : null; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | { |
26 | 26 | $application = new self(); |
27 | 27 | |
28 | - $application->applicationId = PropertyHelper::checkNullValue($amazonRequest,'applicationId'); |
|
28 | + $application->applicationId = PropertyHelper::checkNullValue($amazonRequest, 'applicationId'); |
|
29 | 29 | |
30 | 30 | return $application; |
31 | 31 | } |
@@ -40,9 +40,9 @@ |
||
40 | 40 | { |
41 | 41 | $audioPlayer = new self(); |
42 | 42 | |
43 | - $audioPlayer->token = PropertyHelper::checkNullValue($amazonRequest,'token'); |
|
43 | + $audioPlayer->token = PropertyHelper::checkNullValue($amazonRequest, 'token'); |
|
44 | 44 | $audioPlayer->offsetInMilliseconds = isset($amazonRequest['offsetInMilliseconds']) ? (int) $amazonRequest['offsetInMilliseconds'] : null; |
45 | - $audioPlayer->playerActivity = PropertyHelper::checkNullValue($amazonRequest,'playerActivity'); |
|
45 | + $audioPlayer->playerActivity = PropertyHelper::checkNullValue($amazonRequest, 'playerActivity'); |
|
46 | 46 | |
47 | 47 | return $audioPlayer; |
48 | 48 | } |
@@ -33,9 +33,9 @@ |
||
33 | 33 | { |
34 | 34 | $user = new self(); |
35 | 35 | |
36 | - $user->userId = PropertyHelper::checkNullValue($amazonRequest,'userId'); |
|
36 | + $user->userId = PropertyHelper::checkNullValue($amazonRequest, 'userId'); |
|
37 | 37 | $user->permissions = isset($amazonRequest['permissions']) ? UserPermissions::fromAmazonRequest($amazonRequest['permissions']) : null; |
38 | - $user->accessToken = PropertyHelper::checkNullValue($amazonRequest,'accessToken'); |
|
38 | + $user->accessToken = PropertyHelper::checkNullValue($amazonRequest, 'accessToken'); |
|
39 | 39 | |
40 | 40 | return $user; |
41 | 41 | } |
@@ -123,7 +123,7 @@ |
||
123 | 123 | $request->signatureCertChainUrl = $signatureCertChainUrl; |
124 | 124 | $request->signature = $signature; |
125 | 125 | $request->amazonRequestBody = $amazonRequestBody; |
126 | - $amazonRequest = (array)json_decode($amazonRequestBody, true); |
|
126 | + $amazonRequest = (array) json_decode($amazonRequestBody, true); |
|
127 | 127 | |
128 | 128 | $request->version = PropertyHelper::checkNullValue($amazonRequest, 'version'); |
129 | 129 | $request->session = isset($amazonRequest['session']) ? Session::fromAmazonRequest($amazonRequest['session']) : null; |
@@ -23,7 +23,7 @@ |
||
23 | 23 | { |
24 | 24 | $userPermissions = new self(); |
25 | 25 | |
26 | - $userPermissions->consentToken = PropertyHelper::checkNullValue($amazonRequest,'consentToken'); |
|
26 | + $userPermissions->consentToken = PropertyHelper::checkNullValue($amazonRequest, 'consentToken'); |
|
27 | 27 | |
28 | 28 | return $userPermissions; |
29 | 29 | } |
@@ -39,9 +39,9 @@ |
||
39 | 39 | { |
40 | 40 | $playbackState = new self(); |
41 | 41 | |
42 | - $playbackState->token = PropertyHelper::checkNullValue($amazonRequest,'token'); |
|
43 | - $playbackState->offsetInMilliseconds = PropertyHelper::checkNullValue($amazonRequest,'offsetInMilliseconds'); |
|
44 | - $playbackState->playerActivity = PropertyHelper::checkNullValue($amazonRequest,'playerActivity'); |
|
42 | + $playbackState->token = PropertyHelper::checkNullValue($amazonRequest, 'token'); |
|
43 | + $playbackState->offsetInMilliseconds = PropertyHelper::checkNullValue($amazonRequest, 'offsetInMilliseconds'); |
|
44 | + $playbackState->playerActivity = PropertyHelper::checkNullValue($amazonRequest, 'playerActivity'); |
|
45 | 45 | |
46 | 46 | return $playbackState; |
47 | 47 | } |