@@ -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\Directives\APL\AVGFilter; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\AVGFilter; |
|
| 6 | 6 | |
| 7 | -use MaxBeckers\AmazonAlexa\Response\Directives\APL\Document\AVGFilterType; |
|
| 7 | + use MaxBeckers\AmazonAlexa\Response\Directives\APL\Document\AVGFilterType; |
|
| 8 | 8 | |
| 9 | -abstract class AVGFilter implements \JsonSerializable |
|
| 10 | -{ |
|
| 11 | - /** |
|
| 9 | + abstract class AVGFilter implements \JsonSerializable |
|
| 10 | + { |
|
| 11 | + /** |
|
| 12 | 12 | * @param AVGFilterType $type The type of the AVG filter |
| 13 | 13 | */ |
| 14 | - public function __construct( |
|
| 15 | - public AVGFilterType $type, |
|
| 16 | - ) { |
|
| 17 | - } |
|
| 14 | + public function __construct( |
|
| 15 | + public AVGFilterType $type, |
|
| 16 | + ) { |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - public function jsonSerialize(): array |
|
| 20 | - { |
|
| 21 | - return [ |
|
| 22 | - 'type' => $this->type->value, |
|
| 23 | - ]; |
|
| 24 | - } |
|
| 19 | + public function jsonSerialize(): array |
|
| 20 | + { |
|
| 21 | + return [ |
|
| 22 | + 'type' => $this->type->value, |
|
| 23 | + ]; |
|
| 24 | + } |
|
| 25 | 25 | } |
@@ -1,50 +1,50 @@ |
||
| 1 | -<?php |
|
| 1 | + <?php |
|
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | + declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | -namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\AVGFilter; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\AVGFilter; |
|
| 6 | 6 | |
| 7 | -use MaxBeckers\AmazonAlexa\Response\Directives\APL\Document\AVGFilterType; |
|
| 7 | + use MaxBeckers\AmazonAlexa\Response\Directives\APL\Document\AVGFilterType; |
|
| 8 | 8 | |
| 9 | -class DropShadow extends AVGFilter implements \JsonSerializable |
|
| 10 | -{ |
|
| 11 | - public const TYPE = AVGFilterType::DROP_SHADOW; |
|
| 9 | + class DropShadow extends AVGFilter implements \JsonSerializable |
|
| 10 | + { |
|
| 11 | + public const TYPE = AVGFilterType::DROP_SHADOW; |
|
| 12 | 12 | |
| 13 | - /** |
|
| 13 | + /** |
|
| 14 | 14 | * @param string|null $color Color of the drop shadow |
| 15 | 15 | * @param int|null $horizontalOffset Horizontal offset of the shadow |
| 16 | 16 | * @param int|null $radius Blur radius of the shadow |
| 17 | 17 | * @param int|null $verticalOffset Vertical offset of the shadow |
| 18 | 18 | */ |
| 19 | - public function __construct( |
|
| 20 | - public ?string $color = null, |
|
| 21 | - public ?int $horizontalOffset = null, |
|
| 22 | - public ?int $radius = null, |
|
| 23 | - public ?int $verticalOffset = null, |
|
| 24 | - ) { |
|
| 25 | - parent::__construct(self::TYPE); |
|
| 26 | - } |
|
| 27 | - |
|
| 28 | - public function jsonSerialize(): array |
|
| 29 | - { |
|
| 30 | - $data = parent::jsonSerialize(); |
|
| 31 | - |
|
| 32 | - if ($this->color !== null) { |
|
| 33 | - $data['color'] = $this->color; |
|
| 19 | + public function __construct( |
|
| 20 | + public ?string $color = null, |
|
| 21 | + public ?int $horizontalOffset = null, |
|
| 22 | + public ?int $radius = null, |
|
| 23 | + public ?int $verticalOffset = null, |
|
| 24 | + ) { |
|
| 25 | + parent::__construct(self::TYPE); |
|
| 34 | 26 | } |
| 35 | 27 | |
| 36 | - if ($this->horizontalOffset !== null) { |
|
| 37 | - $data['horizontalOffset'] = $this->horizontalOffset; |
|
| 38 | - } |
|
| 28 | + public function jsonSerialize(): array |
|
| 29 | + { |
|
| 30 | + $data = parent::jsonSerialize(); |
|
| 39 | 31 | |
| 40 | - if ($this->radius !== null) { |
|
| 41 | - $data['radius'] = $this->radius; |
|
| 42 | - } |
|
| 32 | + if ($this->color !== null) { |
|
| 33 | + $data['color'] = $this->color; |
|
| 34 | + } |
|
| 43 | 35 | |
| 44 | - if ($this->verticalOffset !== null) { |
|
| 45 | - $data['verticalOffset'] = $this->verticalOffset; |
|
| 46 | - } |
|
| 36 | + if ($this->horizontalOffset !== null) { |
|
| 37 | + $data['horizontalOffset'] = $this->horizontalOffset; |
|
| 38 | + } |
|
| 39 | + |
|
| 40 | + if ($this->radius !== null) { |
|
| 41 | + $data['radius'] = $this->radius; |
|
| 42 | + } |
|
| 47 | 43 | |
| 48 | - return $data; |
|
| 49 | - } |
|
| 44 | + if ($this->verticalOffset !== null) { |
|
| 45 | + $data['verticalOffset'] = $this->verticalOffset; |
|
| 46 | + } |
|
| 47 | + |
|
| 48 | + return $data; |
|
| 49 | + } |
|
| 50 | 50 | } |
@@ -1,14 +1,14 @@ |
||
| 1 | -<?php |
|
| 1 | + <?php |
|
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | + declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | -namespace MaxBeckers\AmazonAlexa\Response\Directives\APL; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL; |
|
| 6 | 6 | |
| 7 | -enum UpdateIndexListDataOperationType: string |
|
| 8 | -{ |
|
| 9 | - case INSERT_ITEM = 'InsertItem'; |
|
| 10 | - case INSERT_MULTIPLE_ITEMS = 'InsertMultipleItems'; |
|
| 11 | - case SET_ITEM = 'SetItem'; |
|
| 12 | - case DELETE_ITEM = 'DeleteItem'; |
|
| 13 | - case DELETE_MULTIPLE_ITEMS = 'DeleteMultipleItems'; |
|
| 7 | + enum UpdateIndexListDataOperationType: string |
|
| 8 | + { |
|
| 9 | + case INSERT_ITEM = 'InsertItem'; |
|
| 10 | + case INSERT_MULTIPLE_ITEMS = 'InsertMultipleItems'; |
|
| 11 | + case SET_ITEM = 'SetItem'; |
|
| 12 | + case DELETE_ITEM = 'DeleteItem'; |
|
| 13 | + case DELETE_MULTIPLE_ITEMS = 'DeleteMultipleItems'; |
|
| 14 | 14 | } |
@@ -1,57 +1,57 @@ |
||
| 1 | -<?php |
|
| 1 | + <?php |
|
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | + declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | -namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
|
| 6 | 6 | |
| 7 | -use MaxBeckers\AmazonAlexa\Helper\SerializeValueMapper; |
|
| 7 | + use MaxBeckers\AmazonAlexa\Helper\SerializeValueMapper; |
|
| 8 | 8 | |
| 9 | -class Template implements \JsonSerializable |
|
| 10 | -{ |
|
| 11 | - use SerializeValueMapper; |
|
| 9 | + class Template implements \JsonSerializable |
|
| 10 | + { |
|
| 11 | + use SerializeValueMapper; |
|
| 12 | + |
|
| 13 | + public const BACK_BUTTON_MODE_HIDDEN = 'HIDDEN'; |
|
| 14 | + public const BACK_BUTTON_MODE_VISIBLE = 'VISIBLE'; |
|
| 15 | + |
|
| 16 | + /** @var ListItem[] */ |
|
| 17 | + public function __construct( |
|
| 18 | + public ?string $type = null, |
|
| 19 | + public ?string $token = null, |
|
| 20 | + public ?string $backButton = null, |
|
| 21 | + public ?Image $backgroundImage = null, |
|
| 22 | + public ?string $title = null, |
|
| 23 | + public ?TextContent $textContent = null, |
|
| 24 | + public ?Image $image = null, |
|
| 25 | + public array $listItems = [] |
|
| 26 | + ) { |
|
| 27 | + } |
|
| 12 | 28 | |
| 13 | - public const BACK_BUTTON_MODE_HIDDEN = 'HIDDEN'; |
|
| 14 | - public const BACK_BUTTON_MODE_VISIBLE = 'VISIBLE'; |
|
| 29 | + public function addListItem(ListItem $item): void |
|
| 30 | + { |
|
| 31 | + $this->listItems[] = $item; |
|
| 32 | + } |
|
| 15 | 33 | |
| 16 | - /** @var ListItem[] */ |
|
| 17 | - public function __construct( |
|
| 18 | - public ?string $type = null, |
|
| 19 | - public ?string $token = null, |
|
| 20 | - public ?string $backButton = null, |
|
| 21 | - public ?Image $backgroundImage = null, |
|
| 22 | - public ?string $title = null, |
|
| 23 | - public ?TextContent $textContent = null, |
|
| 24 | - public ?Image $image = null, |
|
| 25 | - public array $listItems = [] |
|
| 26 | - ) { |
|
| 27 | - } |
|
| 34 | + public static function create($type, $token, $backButton = self::BACK_BUTTON_MODE_VISIBLE, $backgroundImage = null, $title = null, $textContent = null, $image = null, $listItems = []): self |
|
| 35 | + { |
|
| 36 | + return new self($type, $token, $backButton, $backgroundImage, $title, $textContent, $image, $listItems); |
|
| 37 | + } |
|
| 28 | 38 | |
| 29 | - public function addListItem(ListItem $item): void |
|
| 30 | - { |
|
| 31 | - $this->listItems[] = $item; |
|
| 32 | - } |
|
| 39 | + public function jsonSerialize(): \ArrayObject |
|
| 40 | + { |
|
| 41 | + $data = new \ArrayObject(); |
|
| 33 | 42 | |
| 34 | - public static function create($type, $token, $backButton = self::BACK_BUTTON_MODE_VISIBLE, $backgroundImage = null, $title = null, $textContent = null, $image = null, $listItems = []): self |
|
| 35 | - { |
|
| 36 | - return new self($type, $token, $backButton, $backgroundImage, $title, $textContent, $image, $listItems); |
|
| 37 | - } |
|
| 43 | + $this->valueToArrayIfSet($data, 'type'); |
|
| 44 | + $this->valueToArrayIfSet($data, 'token'); |
|
| 45 | + $this->valueToArrayIfSet($data, 'backButton'); |
|
| 46 | + $this->valueToArrayIfSet($data, 'backgroundImage'); |
|
| 47 | + $this->valueToArrayIfSet($data, 'title'); |
|
| 48 | + $this->valueToArrayIfSet($data, 'textContent'); |
|
| 49 | + $this->valueToArrayIfSet($data, 'image'); |
|
| 38 | 50 | |
| 39 | - public function jsonSerialize(): \ArrayObject |
|
| 40 | - { |
|
| 41 | - $data = new \ArrayObject(); |
|
| 42 | - |
|
| 43 | - $this->valueToArrayIfSet($data, 'type'); |
|
| 44 | - $this->valueToArrayIfSet($data, 'token'); |
|
| 45 | - $this->valueToArrayIfSet($data, 'backButton'); |
|
| 46 | - $this->valueToArrayIfSet($data, 'backgroundImage'); |
|
| 47 | - $this->valueToArrayIfSet($data, 'title'); |
|
| 48 | - $this->valueToArrayIfSet($data, 'textContent'); |
|
| 49 | - $this->valueToArrayIfSet($data, 'image'); |
|
| 50 | - |
|
| 51 | - if (!empty($this->listItems)) { |
|
| 52 | - $data['listItems'] = $this->listItems; |
|
| 53 | - } |
|
| 51 | + if (!empty($this->listItems)) { |
|
| 52 | + $data['listItems'] = $this->listItems; |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - return $data; |
|
| 56 | - } |
|
| 55 | + return $data; |
|
| 56 | + } |
|
| 57 | 57 | } |
@@ -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\Directives\Display; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
|
| 6 | 6 | |
| 7 | -class Image |
|
| 8 | -{ |
|
| 9 | - /** @var ImageSource[] */ |
|
| 10 | - public function __construct( |
|
| 11 | - public ?string $contentDescription = null, |
|
| 12 | - public array $sources = [] |
|
| 13 | - ) { |
|
| 14 | - } |
|
| 15 | - |
|
| 16 | - public static function create(?string $contentDescription = null, array $imageSources = []): self |
|
| 7 | + class Image |
|
| 17 | 8 | { |
| 18 | - return new self($contentDescription, $imageSources); |
|
| 19 | - } |
|
| 9 | + /** @var ImageSource[] */ |
|
| 10 | + public function __construct( |
|
| 11 | + public ?string $contentDescription = null, |
|
| 12 | + public array $sources = [] |
|
| 13 | + ) { |
|
| 14 | + } |
|
| 20 | 15 | |
| 21 | - public function addImageSource(ImageSource $imageSource): void |
|
| 22 | - { |
|
| 23 | - $this->sources[] = $imageSource; |
|
| 24 | - } |
|
| 16 | + public static function create(?string $contentDescription = null, array $imageSources = []): self |
|
| 17 | + { |
|
| 18 | + return new self($contentDescription, $imageSources); |
|
| 19 | + } |
|
| 20 | + |
|
| 21 | + public function addImageSource(ImageSource $imageSource): void |
|
| 22 | + { |
|
| 23 | + $this->sources[] = $imageSource; |
|
| 24 | + } |
|
| 25 | 25 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
| 6 | 6 | |
| 7 | -class Image |
|
| 8 | -{ |
|
| 7 | +class Image { |
|
| 9 | 8 | /** @var ImageSource[] */ |
| 10 | 9 | public function __construct( |
| 11 | 10 | public ?string $contentDescription = null, |
@@ -1,22 +1,22 @@ |
||
| 1 | -<?php |
|
| 1 | + <?php |
|
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | + declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | -namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
|
| 6 | 6 | |
| 7 | -class Text |
|
| 8 | -{ |
|
| 9 | - public const TYPE_PLAIN_TEXT = 'PlainText'; |
|
| 10 | - public const TYPE_RICH_TEXT = 'RichText'; |
|
| 7 | + class Text |
|
| 8 | + { |
|
| 9 | + public const TYPE_PLAIN_TEXT = 'PlainText'; |
|
| 10 | + public const TYPE_RICH_TEXT = 'RichText'; |
|
| 11 | 11 | |
| 12 | - public function __construct( |
|
| 13 | - public ?string $text = null, |
|
| 14 | - public ?string $type = null |
|
| 15 | - ) { |
|
| 16 | - } |
|
| 12 | + public function __construct( |
|
| 13 | + public ?string $text = null, |
|
| 14 | + public ?string $type = null |
|
| 15 | + ) { |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - public static function create(?string $value, string $type = self::TYPE_PLAIN_TEXT): self |
|
| 19 | - { |
|
| 20 | - return new self($value, $type); |
|
| 21 | - } |
|
| 18 | + public static function create(?string $value, string $type = self::TYPE_PLAIN_TEXT): self |
|
| 19 | + { |
|
| 20 | + return new self($value, $type); |
|
| 21 | + } |
|
| 22 | 22 | } |
@@ -1,35 +1,35 @@ |
||
| 1 | -<?php |
|
| 1 | + <?php |
|
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | + declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | -namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
|
| 6 | 6 | |
| 7 | -use MaxBeckers\AmazonAlexa\Helper\SerializeValueMapper; |
|
| 7 | + use MaxBeckers\AmazonAlexa\Helper\SerializeValueMapper; |
|
| 8 | 8 | |
| 9 | -class TextContent implements \JsonSerializable |
|
| 10 | -{ |
|
| 11 | - use SerializeValueMapper; |
|
| 12 | - |
|
| 13 | - public function __construct( |
|
| 14 | - public ?Text $primaryText = null, |
|
| 15 | - public ?Text $secondaryText = null, |
|
| 16 | - public ?Text $tertiaryText = null |
|
| 17 | - ) { |
|
| 18 | - } |
|
| 19 | - |
|
| 20 | - public static function create(?Text $primaryText = null, ?Text $secondaryText = null, ?Text $tertiaryText = null): self |
|
| 21 | - { |
|
| 22 | - return new self($primaryText, $secondaryText, $tertiaryText); |
|
| 23 | - } |
|
| 24 | - |
|
| 25 | - public function jsonSerialize(): \ArrayObject |
|
| 9 | + class TextContent implements \JsonSerializable |
|
| 26 | 10 | { |
| 27 | - $data = new \ArrayObject(); |
|
| 28 | - |
|
| 29 | - $this->valueToArrayIfSet($data, 'primaryText'); |
|
| 30 | - $this->valueToArrayIfSet($data, 'secondaryText'); |
|
| 31 | - $this->valueToArrayIfSet($data, 'tertiaryText'); |
|
| 32 | - |
|
| 33 | - return $data; |
|
| 34 | - } |
|
| 11 | + use SerializeValueMapper; |
|
| 12 | + |
|
| 13 | + public function __construct( |
|
| 14 | + public ?Text $primaryText = null, |
|
| 15 | + public ?Text $secondaryText = null, |
|
| 16 | + public ?Text $tertiaryText = null |
|
| 17 | + ) { |
|
| 18 | + } |
|
| 19 | + |
|
| 20 | + public static function create(?Text $primaryText = null, ?Text $secondaryText = null, ?Text $tertiaryText = null): self |
|
| 21 | + { |
|
| 22 | + return new self($primaryText, $secondaryText, $tertiaryText); |
|
| 23 | + } |
|
| 24 | + |
|
| 25 | + public function jsonSerialize(): \ArrayObject |
|
| 26 | + { |
|
| 27 | + $data = new \ArrayObject(); |
|
| 28 | + |
|
| 29 | + $this->valueToArrayIfSet($data, 'primaryText'); |
|
| 30 | + $this->valueToArrayIfSet($data, 'secondaryText'); |
|
| 31 | + $this->valueToArrayIfSet($data, 'tertiaryText'); |
|
| 32 | + |
|
| 33 | + return $data; |
|
| 34 | + } |
|
| 35 | 35 | } |
@@ -1,43 +1,43 @@ |
||
| 1 | -<?php |
|
| 1 | + <?php |
|
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | + declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | -namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
|
| 6 | 6 | |
| 7 | -use MaxBeckers\AmazonAlexa\Helper\SerializeValueMapper; |
|
| 7 | + use MaxBeckers\AmazonAlexa\Helper\SerializeValueMapper; |
|
| 8 | 8 | |
| 9 | -class ImageSource implements \JsonSerializable |
|
| 10 | -{ |
|
| 11 | - use SerializeValueMapper; |
|
| 12 | - |
|
| 13 | - public const SIZE_X_SMALL = 'X_SMALL'; |
|
| 14 | - public const SIZE_SMALL = 'SMALL'; |
|
| 15 | - public const SIZE_MEDIUM = 'MEDIUM'; |
|
| 16 | - public const SIZE_LARGE = 'LARGE'; |
|
| 17 | - public const SIZE_X_LARGE = 'X_LARGE'; |
|
| 18 | - |
|
| 19 | - public function __construct( |
|
| 20 | - public ?string $url = null, |
|
| 21 | - public ?string $size = null, |
|
| 22 | - public ?int $widthPixels = null, |
|
| 23 | - public ?int $heightPixels = null |
|
| 24 | - ) { |
|
| 25 | - } |
|
| 26 | - |
|
| 27 | - public static function create(string $url, ?string $size = null, ?int $widthPixels = null, ?int $heightPixels = null): self |
|
| 9 | + class ImageSource implements \JsonSerializable |
|
| 28 | 10 | { |
| 29 | - return new self($url, $size, $widthPixels, $heightPixels); |
|
| 30 | - } |
|
| 31 | - |
|
| 32 | - public function jsonSerialize(): \ArrayObject |
|
| 33 | - { |
|
| 34 | - $data = new \ArrayObject(); |
|
| 35 | - |
|
| 36 | - $this->valueToArrayIfSet($data, 'url'); |
|
| 37 | - $this->valueToArrayIfSet($data, 'size'); |
|
| 38 | - $this->valueToArrayIfSet($data, 'widthPixels'); |
|
| 39 | - $this->valueToArrayIfSet($data, 'heightPixels'); |
|
| 40 | - |
|
| 41 | - return $data; |
|
| 42 | - } |
|
| 11 | + use SerializeValueMapper; |
|
| 12 | + |
|
| 13 | + public const SIZE_X_SMALL = 'X_SMALL'; |
|
| 14 | + public const SIZE_SMALL = 'SMALL'; |
|
| 15 | + public const SIZE_MEDIUM = 'MEDIUM'; |
|
| 16 | + public const SIZE_LARGE = 'LARGE'; |
|
| 17 | + public const SIZE_X_LARGE = 'X_LARGE'; |
|
| 18 | + |
|
| 19 | + public function __construct( |
|
| 20 | + public ?string $url = null, |
|
| 21 | + public ?string $size = null, |
|
| 22 | + public ?int $widthPixels = null, |
|
| 23 | + public ?int $heightPixels = null |
|
| 24 | + ) { |
|
| 25 | + } |
|
| 26 | + |
|
| 27 | + public static function create(string $url, ?string $size = null, ?int $widthPixels = null, ?int $heightPixels = null): self |
|
| 28 | + { |
|
| 29 | + return new self($url, $size, $widthPixels, $heightPixels); |
|
| 30 | + } |
|
| 31 | + |
|
| 32 | + public function jsonSerialize(): \ArrayObject |
|
| 33 | + { |
|
| 34 | + $data = new \ArrayObject(); |
|
| 35 | + |
|
| 36 | + $this->valueToArrayIfSet($data, 'url'); |
|
| 37 | + $this->valueToArrayIfSet($data, 'size'); |
|
| 38 | + $this->valueToArrayIfSet($data, 'widthPixels'); |
|
| 39 | + $this->valueToArrayIfSet($data, 'heightPixels'); |
|
| 40 | + |
|
| 41 | + return $data; |
|
| 42 | + } |
|
| 43 | 43 | } |
@@ -1,23 +1,23 @@ |
||
| 1 | -<?php |
|
| 1 | + <?php |
|
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | + declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | -namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
|
| 5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\Display; |
|
| 6 | 6 | |
| 7 | -use MaxBeckers\AmazonAlexa\Response\Directives\Directive; |
|
| 7 | + use MaxBeckers\AmazonAlexa\Response\Directives\Directive; |
|
| 8 | 8 | |
| 9 | -class HintDirective extends Directive |
|
| 10 | -{ |
|
| 11 | - public const TYPE = 'Hint'; |
|
| 9 | + class HintDirective extends Directive |
|
| 10 | + { |
|
| 11 | + public const TYPE = 'Hint'; |
|
| 12 | 12 | |
| 13 | - public function __construct( |
|
| 14 | - public ?Text $hint = null |
|
| 15 | - ) { |
|
| 16 | - parent::__construct(self::TYPE); |
|
| 17 | - } |
|
| 13 | + public function __construct( |
|
| 14 | + public ?Text $hint = null |
|
| 15 | + ) { |
|
| 16 | + parent::__construct(self::TYPE); |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - public static function create(Text $text): self |
|
| 20 | - { |
|
| 21 | - return new self($text); |
|
| 22 | - } |
|
| 19 | + public static function create(Text $text): self |
|
| 20 | + { |
|
| 21 | + return new self($text); |
|
| 22 | + } |
|
| 23 | 23 | } |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | use MaxBeckers\AmazonAlexa\Response\Directives\Directive; |
| 8 | 8 | |
| 9 | -class HintDirective extends Directive |
|
| 10 | -{ |
|
| 9 | +class HintDirective extends Directive { |
|
| 11 | 10 | public const TYPE = 'Hint'; |
| 12 | 11 | |
| 13 | 12 | public function __construct( |