@@ -1,11 +1,11 @@ |
||
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\Document; |
|
5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\Document; |
|
6 | 6 | |
7 | -enum ImportType: string |
|
8 | -{ |
|
9 | - case ALL_OF = 'allOf'; |
|
10 | - case ONE_OF = 'oneOf'; |
|
7 | + enum ImportType: string |
|
8 | + { |
|
9 | + case ALL_OF = 'allOf'; |
|
10 | + case ONE_OF = 'oneOf'; |
|
11 | 11 | } |
@@ -1,15 +1,15 @@ |
||
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\Document; |
|
5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\Document; |
|
6 | 6 | |
7 | -enum TextAlign: string |
|
8 | -{ |
|
9 | - case AUTO = 'auto'; |
|
10 | - case LEFT = 'left'; |
|
11 | - case RIGHT = 'right'; |
|
12 | - case CENTER = 'center'; |
|
13 | - case START = 'start'; |
|
14 | - case END = 'end'; |
|
7 | + enum TextAlign: string |
|
8 | + { |
|
9 | + case AUTO = 'auto'; |
|
10 | + case LEFT = 'left'; |
|
11 | + case RIGHT = 'right'; |
|
12 | + case CENTER = 'center'; |
|
13 | + case START = 'start'; |
|
14 | + case END = 'end'; |
|
15 | 15 | } |
@@ -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\Directives\APL\Document; |
|
5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\Document; |
|
6 | 6 | |
7 | -enum AVGItemType: string |
|
8 | -{ |
|
9 | - case GROUP = 'group'; |
|
10 | - case PATH = 'path'; |
|
11 | - case TEXT = 'text'; |
|
7 | + enum AVGItemType: string |
|
8 | + { |
|
9 | + case GROUP = 'group'; |
|
10 | + case PATH = 'path'; |
|
11 | + case TEXT = 'text'; |
|
12 | 12 | } |
@@ -1,37 +1,37 @@ |
||
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\Document; |
|
5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\Document; |
|
6 | 6 | |
7 | -use MaxBeckers\AmazonAlexa\Response\Directives\APL\Component\APLBaseComponent; |
|
7 | + use MaxBeckers\AmazonAlexa\Response\Directives\APL\Component\APLBaseComponent; |
|
8 | 8 | |
9 | -class Layout implements \JsonSerializable |
|
10 | -{ |
|
11 | - /** |
|
9 | + class Layout implements \JsonSerializable |
|
10 | + { |
|
11 | + /** |
|
12 | 12 | * @param Bind[]|null $bind Array of binding objects |
13 | 13 | * @param string|null $description Optional description of this layout |
14 | 14 | * @param APLBaseComponent|null $item Single component to display |
15 | 15 | * @param APLBaseComponent[]|null $items Array of components to display |
16 | 16 | * @param LayoutParameter[]|null $parameters Array of layout parameters |
17 | 17 | */ |
18 | - public function __construct( |
|
19 | - public ?array $bind = null, |
|
20 | - public ?string $description = null, |
|
21 | - public ?APLBaseComponent $item = null, |
|
22 | - public ?array $items = null, |
|
23 | - public ?array $parameters = null, |
|
24 | - ) { |
|
25 | - } |
|
18 | + public function __construct( |
|
19 | + public ?array $bind = null, |
|
20 | + public ?string $description = null, |
|
21 | + public ?APLBaseComponent $item = null, |
|
22 | + public ?array $items = null, |
|
23 | + public ?array $parameters = null, |
|
24 | + ) { |
|
25 | + } |
|
26 | 26 | |
27 | - public function jsonSerialize(): array |
|
28 | - { |
|
29 | - return array_filter([ |
|
30 | - 'bind' => $this->bind, |
|
31 | - 'description' => $this->description, |
|
32 | - 'item' => $this->item, |
|
33 | - 'items' => $this->items, |
|
34 | - 'parameters' => $this->parameters, |
|
35 | - ], fn ($value) => $value !== null); |
|
36 | - } |
|
27 | + public function jsonSerialize(): array |
|
28 | + { |
|
29 | + return array_filter([ |
|
30 | + 'bind' => $this->bind, |
|
31 | + 'description' => $this->description, |
|
32 | + 'item' => $this->item, |
|
33 | + 'items' => $this->items, |
|
34 | + 'parameters' => $this->parameters, |
|
35 | + ], fn ($value) => $value !== null); |
|
36 | + } |
|
37 | 37 | } |
@@ -1,41 +1,41 @@ |
||
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\Document; |
|
5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\Document; |
|
6 | 6 | |
7 | -class Export implements \JsonSerializable |
|
8 | -{ |
|
9 | - /** |
|
7 | + class Export implements \JsonSerializable |
|
8 | + { |
|
9 | + /** |
|
10 | 10 | * @param ExportItem[] $graphics |
11 | 11 | * @param ExportItem[] $layouts |
12 | 12 | * @param ExportItem[] $resources |
13 | 13 | * @param ExportItem[] $styles |
14 | 14 | */ |
15 | - public function __construct( |
|
16 | - public array $graphics = [], |
|
17 | - public array $layouts = [], |
|
18 | - public array $resources = [], |
|
19 | - public array $styles = [], |
|
20 | - ) { |
|
21 | - } |
|
22 | - |
|
23 | - public function jsonSerialize(): array |
|
24 | - { |
|
25 | - $data = []; |
|
26 | - if (!empty($this->graphics)) { |
|
27 | - $data['graphics'] = $this->graphics; |
|
28 | - } |
|
29 | - if (!empty($this->layouts)) { |
|
30 | - $data['layouts'] = $this->layouts; |
|
31 | - } |
|
32 | - if (!empty($this->resources)) { |
|
33 | - $data['resources'] = $this->resources; |
|
34 | - } |
|
35 | - if (!empty($this->styles)) { |
|
36 | - $data['styles'] = $this->styles; |
|
15 | + public function __construct( |
|
16 | + public array $graphics = [], |
|
17 | + public array $layouts = [], |
|
18 | + public array $resources = [], |
|
19 | + public array $styles = [], |
|
20 | + ) { |
|
37 | 21 | } |
38 | 22 | |
39 | - return $data; |
|
40 | - } |
|
23 | + public function jsonSerialize(): array |
|
24 | + { |
|
25 | + $data = []; |
|
26 | + if (!empty($this->graphics)) { |
|
27 | + $data['graphics'] = $this->graphics; |
|
28 | + } |
|
29 | + if (!empty($this->layouts)) { |
|
30 | + $data['layouts'] = $this->layouts; |
|
31 | + } |
|
32 | + if (!empty($this->resources)) { |
|
33 | + $data['resources'] = $this->resources; |
|
34 | + } |
|
35 | + if (!empty($this->styles)) { |
|
36 | + $data['styles'] = $this->styles; |
|
37 | + } |
|
38 | + |
|
39 | + return $data; |
|
40 | + } |
|
41 | 41 | } |
@@ -1,13 +1,13 @@ |
||
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\Document; |
|
5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\Document; |
|
6 | 6 | |
7 | -enum TextAlignVertical: string |
|
8 | -{ |
|
9 | - case AUTO = 'auto'; |
|
10 | - case TOP = 'top'; |
|
11 | - case BOTTOM = 'bottom'; |
|
12 | - case CENTER = 'center'; |
|
7 | + enum TextAlignVertical: string |
|
8 | + { |
|
9 | + case AUTO = 'auto'; |
|
10 | + case TOP = 'top'; |
|
11 | + case BOTTOM = 'bottom'; |
|
12 | + case CENTER = 'center'; |
|
13 | 13 | } |
@@ -1,31 +1,31 @@ |
||
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\Document; |
|
5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\Document; |
|
6 | 6 | |
7 | -use MaxBeckers\AmazonAlexa\Response\Directives\APL\Component\APLBaseComponent; |
|
7 | + use MaxBeckers\AmazonAlexa\Response\Directives\APL\Component\APLBaseComponent; |
|
8 | 8 | |
9 | -class MainTemplate implements \JsonSerializable |
|
10 | -{ |
|
11 | - /** |
|
9 | + class MainTemplate implements \JsonSerializable |
|
10 | + { |
|
11 | + /** |
|
12 | 12 | * @param string[]|null $parameters Array of parameter names |
13 | 13 | * @param APLBaseComponent|null $item Single component to display |
14 | 14 | * @param APLBaseComponent[]|null $items Array of components to display |
15 | 15 | */ |
16 | - public function __construct( |
|
17 | - public ?array $parameters = null, |
|
18 | - public ?APLBaseComponent $item = null, |
|
19 | - public ?array $items = null, |
|
20 | - ) { |
|
21 | - } |
|
16 | + public function __construct( |
|
17 | + public ?array $parameters = null, |
|
18 | + public ?APLBaseComponent $item = null, |
|
19 | + public ?array $items = null, |
|
20 | + ) { |
|
21 | + } |
|
22 | 22 | |
23 | - public function jsonSerialize(): array |
|
24 | - { |
|
25 | - return array_filter([ |
|
26 | - 'parameters' => $this->parameters, |
|
27 | - 'item' => $this->item, |
|
28 | - 'items' => $this->items, |
|
29 | - ], fn ($value) => $value !== null); |
|
30 | - } |
|
23 | + public function jsonSerialize(): array |
|
24 | + { |
|
25 | + return array_filter([ |
|
26 | + 'parameters' => $this->parameters, |
|
27 | + 'item' => $this->item, |
|
28 | + 'items' => $this->items, |
|
29 | + ], fn ($value) => $value !== null); |
|
30 | + } |
|
31 | 31 | } |
@@ -1,20 +1,20 @@ |
||
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\Document; |
|
5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\Document; |
|
6 | 6 | |
7 | -enum FontWeight: string |
|
8 | -{ |
|
9 | - case NORMAL = 'normal'; |
|
10 | - case BOLD = 'bold'; |
|
11 | - case W100 = '100'; |
|
12 | - case W200 = '200'; |
|
13 | - case W300 = '300'; |
|
14 | - case W400 = '400'; |
|
15 | - case W500 = '500'; |
|
16 | - case W600 = '600'; |
|
17 | - case W700 = '700'; |
|
18 | - case W800 = '800'; |
|
19 | - case W900 = '900'; |
|
7 | + enum FontWeight: string |
|
8 | + { |
|
9 | + case NORMAL = 'normal'; |
|
10 | + case BOLD = 'bold'; |
|
11 | + case W100 = '100'; |
|
12 | + case W200 = '200'; |
|
13 | + case W300 = '300'; |
|
14 | + case W400 = '400'; |
|
15 | + case W500 = '500'; |
|
16 | + case W600 = '600'; |
|
17 | + case W700 = '700'; |
|
18 | + case W800 = '800'; |
|
19 | + case W900 = '900'; |
|
20 | 20 | } |
@@ -1,19 +1,19 @@ |
||
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\Document; |
|
5 | + namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\Document; |
|
6 | 6 | |
7 | -enum ParameterType: string |
|
8 | -{ |
|
9 | - case ANY = 'any'; |
|
10 | - case ARRAY = 'array'; |
|
11 | - case BOOLEAN = 'boolean'; |
|
12 | - case COLOR = 'color'; |
|
13 | - case DIMENSION = 'dimension'; |
|
14 | - case INTEGER = 'integer'; |
|
15 | - case MAP = 'map'; |
|
16 | - case NUMBER = 'number'; |
|
17 | - case OBJECT = 'object'; |
|
18 | - case STRING = 'string'; |
|
7 | + enum ParameterType: string |
|
8 | + { |
|
9 | + case ANY = 'any'; |
|
10 | + case ARRAY = 'array'; |
|
11 | + case BOOLEAN = 'boolean'; |
|
12 | + case COLOR = 'color'; |
|
13 | + case DIMENSION = 'dimension'; |
|
14 | + case INTEGER = 'integer'; |
|
15 | + case MAP = 'map'; |
|
16 | + case NUMBER = 'number'; |
|
17 | + case OBJECT = 'object'; |
|
18 | + case STRING = 'string'; |
|
19 | 19 | } |