@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace MaxBeckers\AmazonAlexa\Request\Request\GameEngine\Event; |
| 6 | 6 | |
| 7 | -class InputEvent |
|
| 8 | -{ |
|
| 7 | +class InputEvent { |
|
| 9 | 8 | public const ACTION_DOWN = 'down'; |
| 10 | 9 | public const ACTION_UP = 'up'; |
| 11 | 10 | |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | use MaxBeckers\AmazonAlexa\Intent\Intent; |
| 9 | 9 | use MaxBeckers\AmazonAlexa\Request\Request\AbstractRequest; |
| 10 | 10 | |
| 11 | -class IntentRequest extends StandardRequest |
|
| 12 | -{ |
|
| 11 | +class IntentRequest extends StandardRequest { |
|
| 13 | 12 | public const DIALOG_STATE_STARTED = 'STARTED'; |
| 14 | 13 | public const DIALOG_STATE_IN_PROGRESS = 'IN_PROGRESS'; |
| 15 | 14 | public const DIALOG_STATE_COMPLETED = 'COMPLETED'; |
@@ -33,11 +33,11 @@ |
||
| 33 | 33 | public ?Intent $intent = null, |
| 34 | 34 | ) { |
| 35 | 35 | parent::__construct( |
| 36 | - type: static::TYPE, |
|
| 37 | - timestamp: $timestamp, |
|
| 38 | - token: $token, |
|
| 39 | - requestId: $requestId, |
|
| 40 | - locale: $locale |
|
| 36 | + type : static::TYPE, |
|
| 37 | + timestamp : $timestamp, |
|
| 38 | + token : $token, |
|
| 39 | + requestId : $requestId, |
|
| 40 | + locale : $locale |
|
| 41 | 41 | ); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace MaxBeckers\AmazonAlexa\Request\Request; |
| 6 | 6 | |
| 7 | -class Error |
|
| 8 | -{ |
|
| 7 | +class Error { |
|
| 9 | 8 | public const TYPE_INVALID_RESPONSE = 'INVALID_RESPONSE'; |
| 10 | 9 | public const TYPE_DEVICE_COMMUNICATION_ERROR = 'DEVICE_COMMUNICATION_ERROR'; |
| 11 | 10 | public const TYPE_INTERNAL_ERROR = 'INTERNAL_ERROR'; |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | |
| 7 | 7 | use MaxBeckers\AmazonAlexa\Request\Request\Standard\IntentRequest; |
| 8 | 8 | |
| 9 | -class CanFulfillIntentRequest extends IntentRequest |
|
| 10 | -{ |
|
| 9 | +class CanFulfillIntentRequest extends IntentRequest { |
|
| 11 | 10 | public const TYPE = 'CanFulfillIntentRequest'; |
| 12 | 11 | } |
@@ -31,8 +31,7 @@ |
||
| 31 | 31 | use MaxBeckers\AmazonAlexa\Request\Request\System\ConnectionsResponseRequest; |
| 32 | 32 | use MaxBeckers\AmazonAlexa\Request\Request\System\ExceptionEncounteredRequest; |
| 33 | 33 | |
| 34 | -class Request |
|
| 35 | -{ |
|
| 34 | +class Request { |
|
| 36 | 35 | /** |
| 37 | 36 | * List of all supported amazon request types. |
| 38 | 37 | */ |
@@ -110,10 +110,10 @@ |
||
| 110 | 110 | $request = new self( |
| 111 | 111 | version: PropertyHelper::checkNullValueString($amazonRequest, 'version'), |
| 112 | 112 | session: isset($amazonRequest['session']) ? Session::fromAmazonRequest($amazonRequest['session']) : null, |
| 113 | - context: isset($amazonRequest['context']) ? Context::fromAmazonRequest($amazonRequest['context']) : null, |
|
| 114 | - amazonRequestBody: $amazonRequestBody, |
|
| 115 | - signatureCertChainUrl: $signatureCertChainUrl, |
|
| 116 | - signature: $signature, |
|
| 113 | + context : isset($amazonRequest['context']) ? Context::fromAmazonRequest($amazonRequest['context']) : null, |
|
| 114 | + amazonRequestBody : $amazonRequestBody, |
|
| 115 | + signatureCertChainUrl : $signatureCertChainUrl, |
|
| 116 | + signature : $signature, |
|
| 117 | 117 | ); |
| 118 | 118 | |
| 119 | 119 | $request->setRequest($amazonRequest); |
@@ -14,8 +14,7 @@ |
||
| 14 | 14 | * This helper class can call the amazon api to get address information. |
| 15 | 15 | * For more details @see https=>//developer.amazon.com/de/docs/custom-skills/device-address-api.html. |
| 16 | 16 | */ |
| 17 | -class DeviceAddressInformationHelper |
|
| 18 | -{ |
|
| 17 | +class DeviceAddressInformationHelper { |
|
| 19 | 18 | public function __construct( |
| 20 | 19 | private readonly Client $client = new Client() |
| 21 | 20 | ) { |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * This trait is helpful for the property to ArrayObject mapping. |
| 9 | 9 | */ |
| 10 | -trait SerializeValueMapper |
|
| 11 | -{ |
|
| 10 | +trait SerializeValueMapper { |
|
| 12 | 11 | protected function valueToArrayIfSet(\ArrayObject $data, string $property): void |
| 13 | 12 | { |
| 14 | 13 | if (null !== $this->{$property}) { |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * This helper class simplifies the property handling. |
| 9 | 9 | */ |
| 10 | -class PropertyHelper |
|
| 11 | -{ |
|
| 10 | +class PropertyHelper { |
|
| 12 | 11 | public static function checkNullValueString(array $data, string $key): ?string |
| 13 | 12 | { |
| 14 | 13 | return $data[$key] ?? null; |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | return $data[$key] ?? null; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - public static function checkNullValueStringOrInt(array $data, string $key): string|int|null |
|
| 22 | + public static function checkNullValueStringOrInt(array $data, string $key): string | int | null |
|
| 23 | 23 | { |
| 24 | 24 | return $data[$key] ?? null; |
| 25 | 25 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace MaxBeckers\AmazonAlexa\Helper; |
| 6 | 6 | |
| 7 | -interface SsmlTypes |
|
| 8 | -{ |
|
| 7 | +interface SsmlTypes { |
|
| 9 | 8 | public const AMAZON_EFFECT_WHISPERED = 'whispered'; |
| 10 | 9 | public const AMAZON_EFFECTS = [self::AMAZON_EFFECT_WHISPERED]; |
| 11 | 10 | public const BREAK_STRENGTH_NONE = 'none'; |