Passed
Pull Request — master (#97)
by Maximilian
04:17
created
src/Response/Directives/APL/Document/Settings.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 class Settings implements \JsonSerializable
8 8
 {
9 9
     public function __construct(
10
-        public int|float|null $idleTimeout = null,
10
+        public int | float | null $idleTimeout = null,
11 11
         public ?PseudoLocalization $pseudoLocalization = null,
12 12
         public bool $supportsResizing = false,
13 13
     ) {
Please login to merge, or discard this patch.
Switch Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,32 +1,32 @@
 block discarded – undo
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 Settings implements \JsonSerializable
8
-{
9
-    public function __construct(
10
-        public int|float|null $idleTimeout = null,
11
-        public ?PseudoLocalization $pseudoLocalization = null,
12
-        public bool $supportsResizing = false,
13
-    ) {
14
-    }
15
-
16
-    public function jsonSerialize(): array
7
+    class Settings implements \JsonSerializable
17 8
     {
18
-        $data = [];
19
-
20
-        if ($this->idleTimeout !== null) {
21
-            $data['idleTimeout'] = $this->idleTimeout;
22
-        }
23
-        if ($this->pseudoLocalization !== null) {
24
-            $data['pseudoLocalization'] = $this->pseudoLocalization;
25
-        }
26
-        if ($this->supportsResizing) {
27
-            $data['supportsResizing'] = $this->supportsResizing;
9
+        public function __construct(
10
+            public int|float|null $idleTimeout = null,
11
+            public ?PseudoLocalization $pseudoLocalization = null,
12
+            public bool $supportsResizing = false,
13
+        ) {
28 14
         }
29 15
 
30
-        return $data;
31
-    }
16
+        public function jsonSerialize(): array
17
+        {
18
+            $data = [];
19
+
20
+            if ($this->idleTimeout !== null) {
21
+                $data['idleTimeout'] = $this->idleTimeout;
22
+            }
23
+            if ($this->pseudoLocalization !== null) {
24
+                $data['pseudoLocalization'] = $this->pseudoLocalization;
25
+            }
26
+            if ($this->supportsResizing) {
27
+                $data['supportsResizing'] = $this->supportsResizing;
28
+            }
29
+
30
+            return $data;
31
+        }
32 32
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/Role.php 1 patch
Switch Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@
 block discarded – undo
29 29
     case SPINBUTTON = 'spinbutton';
30 30
     case SUMMARY = 'summary';
31 31
     case SWITCH = 'switch';
32
-    case TAB = 'tab';
33
-    case TABLIST = 'tablist';
34
-    case TEXT = 'text';
35
-    case TIMER = 'timer';
36
-    case TOOLBAR = 'toolbar';
32
+        case TAB = 'tab';
33
+        case TABLIST = 'tablist';
34
+        case TEXT = 'text';
35
+        case TIMER = 'timer';
36
+        case TOOLBAR = 'toolbar';
37 37
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/SwipeAction.php 1 patch
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
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 SwipeAction: string
8
-{
9
-    case REVEAL = 'reveal';
10
-    case SLIDE = 'slide';
11
-    case COVER = 'cover';
7
+    enum SwipeAction: string
8
+    {
9
+        case REVEAL = 'reveal';
10
+        case SLIDE = 'slide';
11
+        case COVER = 'cover';
12 12
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/Value.php 2 patches
Switch Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@
 block discarded – undo
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 Value implements \JsonSerializable
8
-{
9
-    /**
7
+    class Value implements \JsonSerializable
8
+    {
9
+        /**
10 10
      * @param string $property The property to animate
11 11
      * @param int|float $to Target value for the animation
12 12
      * @param int|float|null $from Starting value (optional). Null means: use current runtime value as implicit start.
13 13
      */
14
-    public function __construct(
15
-        public string $property,
16
-        public int|float $to,
17
-        public int|float|null $from = null,
18
-    ) {
19
-    }
14
+        public function __construct(
15
+            public string $property,
16
+            public int|float $to,
17
+            public int|float|null $from = null,
18
+        ) {
19
+        }
20 20
 
21
-    public function jsonSerialize(): array
22
-    {
23
-        $out = [
24
-            'property' => $this->property,
25
-        ];
21
+        public function jsonSerialize(): array
22
+        {
23
+            $out = [
24
+                'property' => $this->property,
25
+            ];
26 26
 
27
-        if ($this->from !== null) {
28
-            $out['from'] = $this->from;
29
-        }
27
+            if ($this->from !== null) {
28
+                $out['from'] = $this->from;
29
+            }
30 30
 
31
-        $out['to'] = $this->to;
31
+            $out['to'] = $this->to;
32 32
 
33
-        return $out;
34
-    }
33
+            return $out;
34
+        }
35 35
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
      */
14 14
     public function __construct(
15 15
         public string $property,
16
-        public int|float $to,
17
-        public int|float|null $from = null,
16
+        public int | float $to,
17
+        public int | float | null $from = null,
18 18
     ) {
19 19
     }
20 20
 
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/Import.php 1 patch
Switch Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
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 Import implements \JsonSerializable
8
-{
9
-    /**
7
+    class Import implements \JsonSerializable
8
+    {
9
+        /**
10 10
      * @param string $name Package name property
11 11
      * @param string $version Package version property
12 12
      * @param string|null $accept Package accept property (APL 2024.3 and later)
@@ -15,40 +15,40 @@  discard block
 block discarded – undo
15 15
      * @param ImportType|null $type Polymorphic type property
16 16
      * @param bool $when When false, ignore this import
17 17
      */
18
-    public function __construct(
19
-        public string $name,
20
-        public string $version,
21
-        public ?string $accept = null,
22
-        public ?array $loadAfter = null,
23
-        public ?string $source = null,
24
-        public ?ImportType $type = null,
25
-        public bool $when = true,
26
-    ) {
27
-    }
18
+        public function __construct(
19
+            public string $name,
20
+            public string $version,
21
+            public ?string $accept = null,
22
+            public ?array $loadAfter = null,
23
+            public ?string $source = null,
24
+            public ?ImportType $type = null,
25
+            public bool $when = true,
26
+        ) {
27
+        }
28 28
 
29
-    public function jsonSerialize(): array
30
-    {
31
-        $data = [
32
-            'name' => $this->name,
33
-            'version' => $this->version,
34
-        ];
29
+        public function jsonSerialize(): array
30
+        {
31
+            $data = [
32
+                'name' => $this->name,
33
+                'version' => $this->version,
34
+            ];
35 35
 
36
-        if ($this->accept !== null && $this->accept !== '') {
37
-            $data['accept'] = $this->accept;
38
-        }
39
-        if ($this->loadAfter !== null && $this->loadAfter !== []) {
40
-            $data['loadAfter'] = $this->loadAfter;
41
-        }
42
-        if ($this->source !== null && $this->source !== '') {
43
-            $data['source'] = $this->source;
44
-        }
45
-        if ($this->type !== null) {
46
-            $data['type'] = $this->type->value;
47
-        }
48
-        if (!$this->when) {
49
-            $data['when'] = $this->when;
50
-        }
36
+            if ($this->accept !== null && $this->accept !== '') {
37
+                $data['accept'] = $this->accept;
38
+            }
39
+            if ($this->loadAfter !== null && $this->loadAfter !== []) {
40
+                $data['loadAfter'] = $this->loadAfter;
41
+            }
42
+            if ($this->source !== null && $this->source !== '') {
43
+                $data['source'] = $this->source;
44
+            }
45
+            if ($this->type !== null) {
46
+                $data['type'] = $this->type->value;
47
+            }
48
+            if (!$this->when) {
49
+                $data['when'] = $this->when;
50
+            }
51 51
 
52
-        return $data;
53
-    }
52
+            return $data;
53
+        }
54 54
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/AlignItems.php 1 patch
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
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 AlignItems: string
8
-{
9
-    case STRETCH = 'stretch';
10
-    case CENTER = 'center';
11
-    case START = 'start';
12
-    case END = 'end';
13
-    case BASELINE = 'baseline';
7
+    enum AlignItems: string
8
+    {
9
+        case STRETCH = 'stretch';
10
+        case CENTER = 'center';
11
+        case START = 'start';
12
+        case END = 'end';
13
+        case BASELINE = 'baseline';
14 14
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/Scale.php 1 patch
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
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 Scale: string
8
-{
9
-    case BEST_FIT = 'best-fit';
10
-    case BEST_FILL = 'best-fill';
11
-    case BEST_FIT_DOWN = 'best-fit-down';
12
-    case FILL = 'fill';
13
-    case NONE = 'none';
7
+    enum Scale: string
8
+    {
9
+        case BEST_FIT = 'best-fit';
10
+        case BEST_FILL = 'best-fill';
11
+        case BEST_FIT_DOWN = 'best-fit-down';
12
+        case FILL = 'fill';
13
+        case NONE = 'none';
14 14
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/SubmitKeyType.php 1 patch
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
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 SubmitKeyType: string
8
-{
9
-    case DONE = 'done';
10
-    case GO = 'go';
11
-    case NEXT = 'next';
12
-    case SEARCH = 'search';
13
-    case SEND = 'send';
7
+    enum SubmitKeyType: string
8
+    {
9
+        case DONE = 'done';
10
+        case GO = 'go';
11
+        case NEXT = 'next';
12
+        case SEARCH = 'search';
13
+        case SEND = 'send';
14 14
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/APLDocument.php 2 patches
Switch Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
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\StandardCommand\AbstractStandardCommand;
7
+    use MaxBeckers\AmazonAlexa\Response\Directives\APL\StandardCommand\AbstractStandardCommand;
8 8
 
9
-class APLDocument implements \JsonSerializable
10
-{
11
-    /**
9
+    class APLDocument implements \JsonSerializable
10
+    {
11
+        /**
12 12
      * @param MainTemplate $mainTemplate The main template that defines the layout to inflate when the document first displays
13 13
      * @param string $type The type of the document, must be "APL"
14 14
      * @param string $version The APL version this document uses
@@ -32,45 +32,45 @@  discard block
 block discarded – undo
32 32
      * @param Style[]|null $styles Array of Style objects for reusable styling
33 33
      * @param string|null $theme Theme name to apply to the document
34 34
      */
35
-    public function __construct(
36
-        public MainTemplate $mainTemplate,
37
-        public string $type = 'APL',
38
-        public string $version = '2024.3',
39
-        public Gradient|string|null $background = null,
40
-        public ?array $commands = null,
41
-        public ?string $description = null,
42
-        public ?Environment $environment = null,
43
-        public ?Export $export = null,
44
-        public ?array $extensions = null,
45
-        public ?array $graphics = null,
46
-        public ?array $handleKeyDown = null,
47
-        public ?array $handleKeyUp = null,
48
-        public ?array $handleTick = null,
49
-        public ?array $import = null,
50
-        public array $layouts = [],
51
-        public ?AbstractStandardCommand $onConfigChange = null,
52
-        public ?array $onDisplayStateChange = null,
53
-        public ?AbstractStandardCommand $onMount = null,
54
-        public ?array $resources = null,
55
-        public ?Settings $settings = null,
56
-        public ?array $styles = null,
57
-        public ?string $theme = null,
58
-    ) {
59
-    }
35
+        public function __construct(
36
+            public MainTemplate $mainTemplate,
37
+            public string $type = 'APL',
38
+            public string $version = '2024.3',
39
+            public Gradient|string|null $background = null,
40
+            public ?array $commands = null,
41
+            public ?string $description = null,
42
+            public ?Environment $environment = null,
43
+            public ?Export $export = null,
44
+            public ?array $extensions = null,
45
+            public ?array $graphics = null,
46
+            public ?array $handleKeyDown = null,
47
+            public ?array $handleKeyUp = null,
48
+            public ?array $handleTick = null,
49
+            public ?array $import = null,
50
+            public array $layouts = [],
51
+            public ?AbstractStandardCommand $onConfigChange = null,
52
+            public ?array $onDisplayStateChange = null,
53
+            public ?AbstractStandardCommand $onMount = null,
54
+            public ?array $resources = null,
55
+            public ?Settings $settings = null,
56
+            public ?array $styles = null,
57
+            public ?string $theme = null,
58
+        ) {
59
+        }
60 60
 
61
-    public function setLayout(string $name, Layout $layout): void
62
-    {
63
-        $this->layouts[$name] = $layout;
64
-    }
61
+        public function setLayout(string $name, Layout $layout): void
62
+        {
63
+            $this->layouts[$name] = $layout;
64
+        }
65 65
 
66
-    public function jsonSerialize(): array
67
-    {
68
-        return array_filter(get_object_vars($this), function ($val) {
69
-            if (is_array($val)) {
70
-                return count($val) > 0;
71
-            }
66
+        public function jsonSerialize(): array
67
+        {
68
+            return array_filter(get_object_vars($this), function ($val) {
69
+                if (is_array($val)) {
70
+                    return count($val) > 0;
71
+                }
72 72
 
73
-            return $val !== null;
74
-        });
75
-    }
73
+                return $val !== null;
74
+            });
75
+        }
76 76
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         public MainTemplate $mainTemplate,
37 37
         public string $type = 'APL',
38 38
         public string $version = '2024.3',
39
-        public Gradient|string|null $background = null,
39
+        public Gradient | string | null $background = null,
40 40
         public ?array $commands = null,
41 41
         public ?string $description = null,
42 42
         public ?Environment $environment = null,
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function jsonSerialize(): array
67 67
     {
68
-        return array_filter(get_object_vars($this), function ($val) {
68
+        return array_filter(get_object_vars($this), function($val) {
69 69
             if (is_array($val)) {
70 70
                 return count($val) > 0;
71 71
             }
Please login to merge, or discard this patch.