Passed
Push — master ( a53d55...43aca1 )
by Maximilian
03:50
created
src/Response/Directives/APL/Document/Command.php 1 patch
Switch Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -1,47 +1,47 @@
 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 Command implements \JsonSerializable
10
-{
11
-    /**
9
+    class Command implements \JsonSerializable
10
+    {
11
+        /**
12 12
      * @param Parameter[]|null $parameters Array of parameter definitions
13 13
      * @param AbstractStandardCommand|null $command Single command to run
14 14
      * @param AbstractStandardCommand[]|null $commands Array of commands to run
15 15
      * @param string|null $description Description of this command
16 16
      */
17
-    public function __construct(
18
-        public ?array $parameters = null,
19
-        public ?AbstractStandardCommand $command = null,
20
-        public ?array $commands = null,
21
-        public ?string $description = null,
22
-    ) {
23
-    }
24
-
25
-    public function jsonSerialize(): array
26
-    {
27
-        $data = [];
28
-
29
-        if ($this->parameters !== null) {
30
-            $data['parameters'] = $this->parameters;
17
+        public function __construct(
18
+            public ?array $parameters = null,
19
+            public ?AbstractStandardCommand $command = null,
20
+            public ?array $commands = null,
21
+            public ?string $description = null,
22
+        ) {
31 23
         }
32 24
 
33
-        if ($this->command !== null) {
34
-            $data['command'] = $this->command;
35
-        }
25
+        public function jsonSerialize(): array
26
+        {
27
+            $data = [];
36 28
 
37
-        if ($this->commands !== null) {
38
-            $data['commands'] = $this->commands;
39
-        }
29
+            if ($this->parameters !== null) {
30
+                $data['parameters'] = $this->parameters;
31
+            }
40 32
 
41
-        if ($this->description !== null) {
42
-            $data['description'] = $this->description;
43
-        }
33
+            if ($this->command !== null) {
34
+                $data['command'] = $this->command;
35
+            }
36
+
37
+            if ($this->commands !== null) {
38
+                $data['commands'] = $this->commands;
39
+            }
44 40
 
45
-        return $data;
46
-    }
41
+            if ($this->description !== null) {
42
+                $data['description'] = $this->description;
43
+            }
44
+
45
+            return $data;
46
+        }
47 47
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/KeyboardType.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 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 KeyboardType: string
8
-{
9
-    case DECIMAL_PAD = 'decimalPad';
10
-    case NORMAL = 'normal';
11
-    case NUMBER_PAD = 'numberPad';
12
-    case EMAIL_ADDRESS = 'emailAddress';
13
-    case PHONE_PAD = 'phonePad';
14
-    case URL = 'url';
7
+    enum KeyboardType: string
8
+    {
9
+        case DECIMAL_PAD = 'decimalPad';
10
+        case NORMAL = 'normal';
11
+        case NUMBER_PAD = 'numberPad';
12
+        case EMAIL_ADDRESS = 'emailAddress';
13
+        case PHONE_PAD = 'phonePad';
14
+        case URL = 'url';
15 15
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/Parameter.php 1 patch
Switch Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -1,37 +1,37 @@
 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 Parameter implements \JsonSerializable
8
-{
9
-    public function __construct(
10
-        public string $name,
11
-        public mixed $default = null,
12
-        public ?string $description = null,
13
-        public ?ParameterType $type = null,
14
-    ) {
15
-    }
16
-
17
-    public function jsonSerialize(): array
7
+    class Parameter implements \JsonSerializable
18 8
     {
19
-        $data = [
20
-            'name' => $this->name,
21
-        ];
22
-
23
-        if ($this->type !== null) {
24
-            $data['type'] = $this->type;
9
+        public function __construct(
10
+            public string $name,
11
+            public mixed $default = null,
12
+            public ?string $description = null,
13
+            public ?ParameterType $type = null,
14
+        ) {
25 15
         }
26 16
 
27
-        if ($this->default !== null) {
28
-            $data['default'] = $this->default;
29
-        }
17
+        public function jsonSerialize(): array
18
+        {
19
+            $data = [
20
+                'name' => $this->name,
21
+            ];
30 22
 
31
-        if ($this->description !== null) {
32
-            $data['description'] = $this->description;
33
-        }
23
+            if ($this->type !== null) {
24
+                $data['type'] = $this->type;
25
+            }
34 26
 
35
-        return $data;
36
-    }
27
+            if ($this->default !== null) {
28
+                $data['default'] = $this->default;
29
+            }
30
+
31
+            if ($this->description !== null) {
32
+                $data['description'] = $this->description;
33
+            }
34
+
35
+            return $data;
36
+        }
37 37
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/StrokeLineCap.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 StrokeLineCap: string
8
-{
9
-    case BUTT = 'butt';
10
-    case ROUND = 'round';
11
-    case SQUARE = 'square';
7
+    enum StrokeLineCap: string
8
+    {
9
+        case BUTT = 'butt';
10
+        case ROUND = 'round';
11
+        case SQUARE = 'square';
12 12
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/StrokeLineJoin.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 StrokeLineJoin: string
8
-{
9
-    case BEVEL = 'bevel';
10
-    case MITER = 'miter';
11
-    case ROUND = 'round';
7
+    enum StrokeLineJoin: string
8
+    {
9
+        case BEVEL = 'bevel';
10
+        case MITER = 'miter';
11
+        case ROUND = 'round';
12 12
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/GestureType.php 1 patch
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 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 GestureType: string
8
-{
9
-    case DOUBLE_PRESS = 'DoublePress';
10
-    case LONG_PRESS = 'LongPress';
11
-    case SWIPE_AWAY = 'SwipeAway';
12
-    case TAP = 'Tap';
7
+    enum GestureType: string
8
+    {
9
+        case DOUBLE_PRESS = 'DoublePress';
10
+        case LONG_PRESS = 'LongPress';
11
+        case SWIPE_AWAY = 'SwipeAway';
12
+        case TAP = 'Tap';
13 13
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/ExportItem.php 1 patch
Switch Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 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 ExportItem implements \JsonSerializable
8
-{
9
-    public function __construct(
10
-        public string $name,
11
-        public string $description = '',
12
-    ) {
13
-    }
14
-
15
-    public function jsonSerialize(): array
7
+    class ExportItem implements \JsonSerializable
16 8
     {
17
-        return array_filter([
18
-            'name' => $this->name,
19
-            'description' => $this->description ?: null,
20
-        ]);
21
-    }
9
+        public function __construct(
10
+            public string $name,
11
+            public string $description = '',
12
+        ) {
13
+        }
14
+
15
+        public function jsonSerialize(): array
16
+        {
17
+            return array_filter([
18
+                'name' => $this->name,
19
+                'description' => $this->description ?: null,
20
+            ]);
21
+        }
22 22
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Document/APLComponentType.php 1 patch
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 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 APLComponentType: string
8
-{
9
-    case CONTAINER = 'Container';
10
-    case EDIT_TEXT = 'EditText';
11
-    case FLEX_SEQUENCE = 'FlexSequence';
12
-    case FRAME = 'Frame';
13
-    case GRID_SEQUENCE = 'GridSequence';
14
-    case IMAGE = 'Image';
15
-    case PAGER = 'Pager';
16
-    case SCROLL_VIEW = 'ScrollView';
17
-    case SEQUENCE = 'Sequence';
18
-    case TEXT = 'Text';
19
-    case TOUCH_WRAPPER = 'TouchWrapper';
20
-    case VECTOR_GRAPHIC = 'VectorGraphic';
21
-    case VIDEO = 'Video';
7
+    enum APLComponentType: string
8
+    {
9
+        case CONTAINER = 'Container';
10
+        case EDIT_TEXT = 'EditText';
11
+        case FLEX_SEQUENCE = 'FlexSequence';
12
+        case FRAME = 'Frame';
13
+        case GRID_SEQUENCE = 'GridSequence';
14
+        case IMAGE = 'Image';
15
+        case PAGER = 'Pager';
16
+        case SCROLL_VIEW = 'ScrollView';
17
+        case SEQUENCE = 'Sequence';
18
+        case TEXT = 'Text';
19
+        case TOUCH_WRAPPER = 'TouchWrapper';
20
+        case VECTOR_GRAPHIC = 'VectorGraphic';
21
+        case VIDEO = 'Video';
22 22
 }
Please login to merge, or discard this patch.
src/Response/Directives/APL/Gesture/DoublePress.php 1 patch
Switch Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@
 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\Gesture;
5
+    namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\Gesture;
6 6
 
7
-use MaxBeckers\AmazonAlexa\Response\Directives\APL\Document\GestureType;
8
-use MaxBeckers\AmazonAlexa\Response\Directives\APL\StandardCommand\AbstractStandardCommand;
7
+    use MaxBeckers\AmazonAlexa\Response\Directives\APL\Document\GestureType;
8
+    use MaxBeckers\AmazonAlexa\Response\Directives\APL\StandardCommand\AbstractStandardCommand;
9 9
 
10
-class DoublePress extends AbstractGesture
11
-{
12
-    /**
10
+    class DoublePress extends AbstractGesture
11
+    {
12
+        /**
13 13
      * @param AbstractStandardCommand[]|null $onDoublePress Commands to run on double press
14 14
      * @param AbstractStandardCommand[]|null $onSinglePress Commands to run on single press
15 15
      * @param AbstractStandardCommand[]|null $onCancel Commands to run when gesture is cancelled
16 16
      * @param bool|null $when APL boolean expression controlling whether this gesture is active
17 17
      */
18
-    public function __construct(
19
-        public ?array $onDoublePress = null,
20
-        public ?array $onSinglePress = null,
21
-        ?array $onCancel = null,
22
-        ?bool $when = null,
23
-    ) {
24
-        parent::__construct(GestureType::DOUBLE_PRESS, $onCancel, $when);
25
-    }
26
-
27
-    public function jsonSerialize(): array
28
-    {
29
-        $data = parent::jsonSerialize();
30
-
31
-        if ($this->onDoublePress !== null && !empty($this->onDoublePress)) {
32
-            $data['onDoublePress'] = $this->onDoublePress;
18
+        public function __construct(
19
+            public ?array $onDoublePress = null,
20
+            public ?array $onSinglePress = null,
21
+            ?array $onCancel = null,
22
+            ?bool $when = null,
23
+        ) {
24
+            parent::__construct(GestureType::DOUBLE_PRESS, $onCancel, $when);
33 25
         }
34 26
 
35
-        if ($this->onSinglePress !== null && !empty($this->onSinglePress)) {
36
-            $data['onSinglePress'] = $this->onSinglePress;
37
-        }
27
+        public function jsonSerialize(): array
28
+        {
29
+            $data = parent::jsonSerialize();
38 30
 
39
-        return $data;
40
-    }
31
+            if ($this->onDoublePress !== null && !empty($this->onDoublePress)) {
32
+                $data['onDoublePress'] = $this->onDoublePress;
33
+            }
34
+
35
+            if ($this->onSinglePress !== null && !empty($this->onSinglePress)) {
36
+                $data['onSinglePress'] = $this->onSinglePress;
37
+            }
38
+
39
+            return $data;
40
+        }
41 41
 }
Please login to merge, or discard this patch.