Passed
Pull Request — master (#98)
by Maximilian
03:22
created
test/Test/Response/Directives/DisplayTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@
 block discarded – undo
15 15
 use MaxBeckers\AmazonAlexa\Response\Directives\Display\TextContent;
16 16
 use PHPUnit\Framework\TestCase;
17 17
 
18
-class DisplayTest extends TestCase
19
-{
18
+class DisplayTest extends TestCase {
20 19
     public function testText(): void
21 20
     {
22 21
         $text = Text::create('Test');
Please login to merge, or discard this patch.
test/Test/Response/Directives/GameEngineTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@
 block discarded – undo
13 13
 use MaxBeckers\AmazonAlexa\Response\Directives\GameEngine\StopInputHandlerDirective;
14 14
 use PHPUnit\Framework\TestCase;
15 15
 
16
-class GameEngineTest extends TestCase
17
-{
16
+class GameEngineTest extends TestCase {
18 17
     public function testStartInputHandlerDirective(): void
19 18
     {
20 19
         $pattern = Pattern::create(Pattern::ACTION_UP, ['gadgetId1', 'gadgetId2'], ['blue']);
Please login to merge, or discard this patch.
test/Test/Response/Directives/Display/TemplateTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@
 block discarded – undo
11 11
 use MaxBeckers\AmazonAlexa\Response\Directives\Display\TextContent;
12 12
 use PHPUnit\Framework\TestCase;
13 13
 
14
-class TemplateTest extends TestCase
15
-{
14
+class TemplateTest extends TestCase {
16 15
     public function testSerializeTypeAndToken(): void
17 16
     {
18 17
         $type = 'BodyTemplate1';
Please login to merge, or discard this patch.
test/Test/Response/Directives/Display/TextContentTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
 use MaxBeckers\AmazonAlexa\Response\Directives\Display\TextContent;
10 10
 use PHPUnit\Framework\TestCase;
11 11
 
12
-class TextContentTest extends TestCase
13
-{
12
+class TextContentTest extends TestCase {
14 13
     public function testSerializePrimaryOnly(): void
15 14
     {
16 15
         $primaryText = Text::create('primaryText');
Please login to merge, or discard this patch.
test/Test/Response/Directives/VideoAppTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
 use MaxBeckers\AmazonAlexa\Response\Directives\VideoApp\VideoLaunchDirective;
10 10
 use PHPUnit\Framework\TestCase;
11 11
 
12
-class VideoAppTest extends TestCase
13
-{
12
+class VideoAppTest extends TestCase {
14 13
     public function testMetadata(): void
15 14
     {
16 15
         $meta = Metadata::create();
Please login to merge, or discard this patch.
test/Test/Response/CardTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@
 block discarded – undo
10 10
 use MaxBeckers\AmazonAlexa\Response\CardImage;
11 11
 use PHPUnit\Framework\TestCase;
12 12
 
13
-class CardTest extends TestCase
14
-{
13
+class CardTest extends TestCase {
15 14
     public function testSimpleCard(): void
16 15
     {
17 16
         $title = 'title';
Please login to merge, or discard this patch.
test/Test/Response/ResponseHelperTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@
 block discarded – undo
10 10
 use MaxBeckers\AmazonAlexa\Response\OutputSpeech;
11 11
 use PHPUnit\Framework\TestCase;
12 12
 
13
-class ResponseHelperTest extends TestCase
14
-{
13
+class ResponseHelperTest extends TestCase {
15 14
     private const RESPOND = 'Respond';
16 15
     private const REPROMPT = 'Reprompt';
17 16
 
Please login to merge, or discard this patch.
test/Test/Response/CanFulfillResponseBodyTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
 use MaxBeckers\AmazonAlexa\Response\CanFulfill\CanFulfillSlot;
10 10
 use PHPUnit\Framework\TestCase;
11 11
 
12
-class CanFulfillResponseBodyTest extends TestCase
13
-{
12
+class CanFulfillResponseBodyTest extends TestCase {
14 13
     public function testJsonSerialize(): void
15 14
     {
16 15
         $slot1 = CanFulfillSlot::create(CanFulfillSlot::CAN_UNDERSTAND_YES, CanFulfillSlot::CAN_FULFILL_YES);
Please login to merge, or discard this patch.
test/Test/Validation/RequestValidatorTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $requestValidator = new RequestValidator(RequestValidator::TIMESTAMP_VALID_TOLERANCE_SECONDS, $client);
55 55
 
56 56
         $client->method('request')
57
-               ->willReturn($apiResponse);
57
+                ->willReturn($apiResponse);
58 58
         $apiResponse->method('getStatusCode')
59 59
                     ->willReturn(200);
60 60
         $apiResponse->method('getBody')
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $requestValidator = new RequestValidator(RequestValidator::TIMESTAMP_VALID_TOLERANCE_SECONDS, $client);
83 83
 
84 84
         $client->method('request')
85
-               ->willReturn($apiResponse);
85
+                ->willReturn($apiResponse);
86 86
         $apiResponse->method('getStatusCode')
87 87
                     ->willReturn(400);
88 88
 
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
 use Psr\Http\Message\ResponseInterface;
15 15
 use Psr\Http\Message\StreamInterface;
16 16
 
17
-class RequestValidatorTest extends TestCase
18
-{
17
+class RequestValidatorTest extends TestCase {
19 18
     public function testInvalidRequestTime(): void
20 19
     {
21 20
         $requestValidator = new RequestValidator();
@@ -112,8 +111,7 @@  discard block
 block discarded – undo
112 111
 
113 112
         // validateSignature will fail (no real cert), so disable signature path by overriding property
114 113
         $intentWithNoSignature = new class ($intent) extends IntentRequest {
115
-            public function __construct(IntentRequest $base)
116
-            {
114
+            public function __construct(IntentRequest $base) {
117 115
                 $this->timestamp = $base->timestamp;
118 116
                 $this->type = $base->type;
119 117
             }
@@ -138,8 +136,7 @@  discard block
 block discarded – undo
138 136
         $r = new Request();
139 137
         $r->request = $intent;
140 138
         $intent = new class ($intent) extends IntentRequest {
141
-            public function __construct(IntentRequest $base)
142
-            {
139
+            public function __construct(IntentRequest $base) {
143 140
                 $this->timestamp = $base->timestamp;
144 141
                 $this->type = $base->type;
145 142
             }
@@ -172,8 +169,7 @@  discard block
 block discarded – undo
172 169
     {
173 170
         $validator = new RequestValidator();
174 171
         $intent = new class () extends IntentRequest {
175
-            public function __construct()
176
-            {
172
+            public function __construct() {
177 173
                 $this->timestamp = new \DateTime('-5 hours'); // would normally fail
178 174
                 $this->type = 'test';
179 175
             }
@@ -201,8 +197,7 @@  discard block
 block discarded – undo
201 197
         $validator = new RequestValidator(RequestValidator::TIMESTAMP_VALID_TOLERANCE_SECONDS, $client);
202 198
 
203 199
         $intent = new class () extends IntentRequest {
204
-            public function __construct()
205
-            {
200
+            public function __construct() {
206 201
                 $this->timestamp = new \DateTime();
207 202
                 $this->type = 'test';
208 203
             }
@@ -235,8 +230,7 @@  discard block
 block discarded – undo
235 230
         $validator = new RequestValidator(RequestValidator::TIMESTAMP_VALID_TOLERANCE_SECONDS, $client);
236 231
 
237 232
         $intent = new class () extends IntentRequest {
238
-            public function __construct()
239
-            {
233
+            public function __construct() {
240 234
                 $this->timestamp = new \DateTime();
241 235
                 $this->type = 'test';
242 236
             }
@@ -268,8 +262,7 @@  discard block
 block discarded – undo
268 262
         $validator = new RequestValidator(RequestValidator::TIMESTAMP_VALID_TOLERANCE_SECONDS, $client);
269 263
 
270 264
         $intent = new class () extends IntentRequest {
271
-            public function __construct()
272
-            {
265
+            public function __construct() {
273 266
                 $this->timestamp = new \DateTime();
274 267
                 $this->type = 'test';
275 268
             }
Please login to merge, or discard this patch.