@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
| 6 | 6 | |
| 7 | -class Text |
|
| 8 | -{ |
|
| 7 | +class Text { |
|
| 9 | 8 | public const TYPE_PLAIN_TEXT = 'PlainText'; |
| 10 | 9 | public const TYPE_RICH_TEXT = 'RichText'; |
| 11 | 10 | |
@@ -4,6 +4,5 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace MaxBeckers\AmazonAlexa\Response; |
| 6 | 6 | |
| 7 | -interface ResponseBodyInterface |
|
| 8 | -{ |
|
| 7 | +interface ResponseBodyInterface { |
|
| 9 | 8 | } |
@@ -4,9 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace MaxBeckers\AmazonAlexa\Response; |
| 6 | 6 | |
| 7 | -class Reprompt |
|
| 8 | -{ |
|
| 9 | - public function __construct(public OutputSpeech $outputSpeech) |
|
| 10 | - { |
|
| 7 | +class Reprompt { |
|
| 8 | + public function __construct(public OutputSpeech $outputSpeech) { |
|
| 11 | 9 | } |
| 12 | 10 | } |
@@ -1,12 +1,12 @@ |
||
| 1 | -<?php |
|
| 1 | + <?php |
|
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | + declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | -namespace MaxBeckers\AmazonAlexa\Response; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response; |
|
| 6 | 6 | |
| 7 | -class Reprompt |
|
| 8 | -{ |
|
| 9 | - public function __construct(public OutputSpeech $outputSpeech) |
|
| 7 | + class Reprompt |
|
| 10 | 8 | { |
| 11 | - } |
|
| 9 | + public function __construct(public OutputSpeech $outputSpeech) |
|
| 10 | + { |
|
| 11 | + } |
|
| 12 | 12 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace MaxBeckers\AmazonAlexa\Response\CanFulfill; |
| 6 | 6 | |
| 7 | -class CanFulfillIntentResponse |
|
| 8 | -{ |
|
| 7 | +class CanFulfillIntentResponse { |
|
| 9 | 8 | public const CAN_FULFILL_YES = 'YES'; |
| 10 | 9 | public const CAN_FULFILL_MAYBE = 'MAYBE'; |
| 11 | 10 | public const CAN_FULFILL_NO = 'NO'; |
@@ -1,29 +1,29 @@ |
||
| 1 | -<?php |
|
| 1 | + <?php |
|
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | + declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | -namespace MaxBeckers\AmazonAlexa\Response\CanFulfill; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response\CanFulfill; |
|
| 6 | 6 | |
| 7 | -class CanFulfillIntentResponse |
|
| 8 | -{ |
|
| 9 | - public const CAN_FULFILL_YES = 'YES'; |
|
| 10 | - public const CAN_FULFILL_MAYBE = 'MAYBE'; |
|
| 11 | - public const CAN_FULFILL_NO = 'NO'; |
|
| 7 | + class CanFulfillIntentResponse |
|
| 8 | + { |
|
| 9 | + public const CAN_FULFILL_YES = 'YES'; |
|
| 10 | + public const CAN_FULFILL_MAYBE = 'MAYBE'; |
|
| 11 | + public const CAN_FULFILL_NO = 'NO'; |
|
| 12 | 12 | |
| 13 | - /** @var CanFulfillSlot[] */ |
|
| 14 | - public function __construct( |
|
| 15 | - public ?string $canFulfill = null, |
|
| 16 | - public array $slots = [] |
|
| 17 | - ) { |
|
| 18 | - } |
|
| 13 | + /** @var CanFulfillSlot[] */ |
|
| 14 | + public function __construct( |
|
| 15 | + public ?string $canFulfill = null, |
|
| 16 | + public array $slots = [] |
|
| 17 | + ) { |
|
| 18 | + } |
|
| 19 | 19 | |
| 20 | - public static function create(string $canFulfill, array $slots = []): self |
|
| 21 | - { |
|
| 22 | - return new self($canFulfill, $slots); |
|
| 23 | - } |
|
| 20 | + public static function create(string $canFulfill, array $slots = []): self |
|
| 21 | + { |
|
| 22 | + return new self($canFulfill, $slots); |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - public function addSlot(string $slotName, CanFulfillSlot $canFulfillSlot): void |
|
| 26 | - { |
|
| 27 | - $this->slots[$slotName] = $canFulfillSlot; |
|
| 28 | - } |
|
| 25 | + public function addSlot(string $slotName, CanFulfillSlot $canFulfillSlot): void |
|
| 26 | + { |
|
| 27 | + $this->slots[$slotName] = $canFulfillSlot; |
|
| 28 | + } |
|
| 29 | 29 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace MaxBeckers\AmazonAlexa\Response\CanFulfill; |
| 6 | 6 | |
| 7 | -class CanFulfillSlot |
|
| 8 | -{ |
|
| 7 | +class CanFulfillSlot { |
|
| 9 | 8 | public const CAN_UNDERSTAND_YES = 'YES'; |
| 10 | 9 | public const CAN_UNDERSTAND_MAYBE = 'MAYBE'; |
| 11 | 10 | public const CAN_UNDERSTAND_NO = 'NO'; |
@@ -1,25 +1,25 @@ |
||
| 1 | -<?php |
|
| 1 | + <?php |
|
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | + declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | -namespace MaxBeckers\AmazonAlexa\Response\CanFulfill; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response\CanFulfill; |
|
| 6 | 6 | |
| 7 | -class CanFulfillSlot |
|
| 8 | -{ |
|
| 9 | - public const CAN_UNDERSTAND_YES = 'YES'; |
|
| 10 | - public const CAN_UNDERSTAND_MAYBE = 'MAYBE'; |
|
| 11 | - public const CAN_UNDERSTAND_NO = 'NO'; |
|
| 12 | - public const CAN_FULFILL_YES = 'YES'; |
|
| 13 | - public const CAN_FULFILL_NO = 'NO'; |
|
| 7 | + class CanFulfillSlot |
|
| 8 | + { |
|
| 9 | + public const CAN_UNDERSTAND_YES = 'YES'; |
|
| 10 | + public const CAN_UNDERSTAND_MAYBE = 'MAYBE'; |
|
| 11 | + public const CAN_UNDERSTAND_NO = 'NO'; |
|
| 12 | + public const CAN_FULFILL_YES = 'YES'; |
|
| 13 | + public const CAN_FULFILL_NO = 'NO'; |
|
| 14 | 14 | |
| 15 | - public function __construct( |
|
| 16 | - public ?string $canUnderstand = null, |
|
| 17 | - public ?string $canFulfill = null |
|
| 18 | - ) { |
|
| 19 | - } |
|
| 15 | + public function __construct( |
|
| 16 | + public ?string $canUnderstand = null, |
|
| 17 | + public ?string $canFulfill = null |
|
| 18 | + ) { |
|
| 19 | + } |
|
| 20 | 20 | |
| 21 | - public static function create(string $canUnderstand, string $canFulfill): self |
|
| 22 | - { |
|
| 23 | - return new self($canUnderstand, $canFulfill); |
|
| 24 | - } |
|
| 21 | + public static function create(string $canUnderstand, string $canFulfill): self |
|
| 22 | + { |
|
| 23 | + return new self($canUnderstand, $canFulfill); |
|
| 24 | + } |
|
| 25 | 25 | } |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | use MaxBeckers\AmazonAlexa\Helper\PropertyHelper; |
| 8 | 8 | |
| 9 | -class AudioPlayer |
|
| 10 | -{ |
|
| 9 | +class AudioPlayer { |
|
| 11 | 10 | public const PLAYER_ACTIVITY_IDLE = 'IDLE'; |
| 12 | 11 | public const PLAYER_ACTIVITY_PAUSED = 'PAUSED'; |
| 13 | 12 | public const PLAYER_ACTIVITY_PLAYING = 'PLAYING'; |
@@ -30,9 +30,9 @@ |
||
| 30 | 30 | public static function fromAmazonRequest(array $amazonRequest): self |
| 31 | 31 | { |
| 32 | 32 | return new self( |
| 33 | - token: PropertyHelper::checkNullValueString($amazonRequest, 'token'), |
|
| 34 | - offsetInMilliseconds: PropertyHelper::checkNullValueInt($amazonRequest, 'offsetInMilliseconds'), |
|
| 35 | - playerActivity: PropertyHelper::checkNullValueString($amazonRequest, 'playerActivity'), |
|
| 33 | + token : PropertyHelper::checkNullValueString($amazonRequest, 'token'), |
|
| 34 | + offsetInMilliseconds : PropertyHelper::checkNullValueInt($amazonRequest, 'offsetInMilliseconds'), |
|
| 35 | + playerActivity : PropertyHelper::checkNullValueString($amazonRequest, 'playerActivity'), |
|
| 36 | 36 | ); |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | use MaxBeckers\AmazonAlexa\Helper\PropertyHelper; |
| 8 | 8 | use MaxBeckers\AmazonAlexa\Request\Request\AbstractRequest; |
| 9 | 9 | |
| 10 | -class ConnectionsResponseRequest extends SystemRequest |
|
| 11 | -{ |
|
| 10 | +class ConnectionsResponseRequest extends SystemRequest { |
|
| 12 | 11 | public const TYPE = 'Connections.Response'; |
| 13 | 12 | public const NAME_UPSELL = 'Upsell'; |
| 14 | 13 | public const NAME_BUY = 'Buy'; |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | name: PropertyHelper::checkNullValueString($amazonRequest, 'name'), |
| 45 | 45 | token: PropertyHelper::checkNullValueString($amazonRequest, 'token'), |
| 46 | 46 | status: isset($amazonRequest['status']) ? Status::fromAmazonRequest($amazonRequest['status']) : null, |
| 47 | - payload: isset($amazonRequest['payload']) ? Payload::fromAmazonRequest($amazonRequest['payload']) : null, |
|
| 47 | + payload : isset($amazonRequest['payload']) ? Payload::fromAmazonRequest($amazonRequest['payload']) : null, |
|
| 48 | 48 | ); |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | use MaxBeckers\AmazonAlexa\Helper\PropertyHelper; |
| 8 | 8 | |
| 9 | -class Payload |
|
| 10 | -{ |
|
| 9 | +class Payload { |
|
| 11 | 10 | public const RESULT_ACCEPTED = 'ACCEPTED'; |
| 12 | 11 | public const RESULT_DECLINED = 'DECLINED'; |
| 13 | 12 | public const RESULT_ALREADY_PURCHASED = 'ALREADY_PURCHASED'; |
@@ -28,9 +28,9 @@ |
||
| 28 | 28 | public static function fromAmazonRequest(array $amazonRequest): self |
| 29 | 29 | { |
| 30 | 30 | return new self( |
| 31 | - purchaseResult: PropertyHelper::checkNullValueString($amazonRequest, 'purchaseResult'), |
|
| 32 | - productId: PropertyHelper::checkNullValueString($amazonRequest, 'productId'), |
|
| 33 | - message: PropertyHelper::checkNullValueString($amazonRequest, 'message'), |
|
| 31 | + purchaseResult : PropertyHelper::checkNullValueString($amazonRequest, 'purchaseResult'), |
|
| 32 | + productId : PropertyHelper::checkNullValueString($amazonRequest, 'productId'), |
|
| 33 | + message : PropertyHelper::checkNullValueString($amazonRequest, 'message'), |
|
| 34 | 34 | ); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | use MaxBeckers\AmazonAlexa\Helper\PropertyHelper; |
| 8 | 8 | |
| 9 | -class SkillDisabledBody |
|
| 10 | -{ |
|
| 9 | +class SkillDisabledBody { |
|
| 11 | 10 | public const PERSISTED = 'PERSISTED'; |
| 12 | 11 | public const NOT_PERSISTED = 'NOT_PERSISTED'; |
| 13 | 12 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | public static function fromAmazonRequest(array $amazonRequest): self |
| 23 | 23 | { |
| 24 | 24 | return new self( |
| 25 | - userInformationPersistenceStatus: PropertyHelper::checkNullValueString($amazonRequest, 'userInformationPersistenceStatus'), |
|
| 25 | + userInformationPersistenceStatus : PropertyHelper::checkNullValueString($amazonRequest, 'userInformationPersistenceStatus'), |
|
| 26 | 26 | ); |
| 27 | 27 | } |
| 28 | 28 | } |