@@ -14,8 +14,7 @@ |
||
14 | 14 | * This helper class can call the amazon api to get address information. |
15 | 15 | * For more details @see https=>//developer.amazon.com/de/docs/custom-skills/device-address-api.html. |
16 | 16 | */ |
17 | -class DeviceAddressInformationHelper |
|
18 | -{ |
|
17 | +class DeviceAddressInformationHelper { |
|
19 | 18 | public function __construct( |
20 | 19 | private readonly Client $client = new Client() |
21 | 20 | ) { |
@@ -7,8 +7,7 @@ |
||
7 | 7 | /** |
8 | 8 | * This trait is helpful for the property to ArrayObject mapping. |
9 | 9 | */ |
10 | -trait SerializeValueMapper |
|
11 | -{ |
|
10 | +trait SerializeValueMapper { |
|
12 | 11 | protected function valueToArrayIfSet(\ArrayObject $data, string $property): void |
13 | 12 | { |
14 | 13 | if (null !== $this->{$property}) { |
@@ -14,13 +14,11 @@ |
||
14 | 14 | /** |
15 | 15 | * This helper class can create simple responses for the most needed intents. |
16 | 16 | */ |
17 | -class ResponseHelper |
|
18 | -{ |
|
17 | +class ResponseHelper { |
|
19 | 18 | public Response $response; |
20 | 19 | public ResponseBody $responseBody; |
21 | 20 | |
22 | - public function __construct() |
|
23 | - { |
|
21 | + public function __construct() { |
|
24 | 22 | $this->resetResponse(); |
25 | 23 | } |
26 | 24 |
@@ -7,8 +7,7 @@ |
||
7 | 7 | /** |
8 | 8 | * This helper class simplifies the property handling. |
9 | 9 | */ |
10 | -class PropertyHelper |
|
11 | -{ |
|
10 | +class PropertyHelper { |
|
12 | 11 | public static function checkNullValueString(array $data, string $key): ?string |
13 | 12 | { |
14 | 13 | return $data[$key] ?? null; |
@@ -4,8 +4,7 @@ |
||
4 | 4 | |
5 | 5 | namespace MaxBeckers\AmazonAlexa\Helper; |
6 | 6 | |
7 | -interface SsmlTypes |
|
8 | -{ |
|
7 | +interface SsmlTypes { |
|
9 | 8 | public const AMAZON_EFFECT_WHISPERED = 'whispered'; |
10 | 9 | public const AMAZON_EFFECTS = [self::AMAZON_EFFECT_WHISPERED]; |
11 | 10 | public const BREAK_STRENGTH_NONE = 'none'; |
@@ -6,8 +6,7 @@ |
||
6 | 6 | |
7 | 7 | use MaxBeckers\AmazonAlexa\Exception\InvalidSsmlException; |
8 | 8 | |
9 | -class SsmlGenerator implements SsmlTypes |
|
10 | -{ |
|
9 | +class SsmlGenerator implements SsmlTypes { |
|
11 | 10 | /** |
12 | 11 | * Enable this flag, when you need escaped special chars in your content (for example escaped "&"). |
13 | 12 | */ |
@@ -8,8 +8,7 @@ |
||
8 | 8 | use MaxBeckers\AmazonAlexa\Intent\Slot; |
9 | 9 | use PHPUnit\Framework\TestCase; |
10 | 10 | |
11 | -class IntentTest extends TestCase |
|
12 | -{ |
|
11 | +class IntentTest extends TestCase { |
|
13 | 12 | public function testWithoutResolutions(): void |
14 | 13 | { |
15 | 14 | $json = file_get_contents(__DIR__ . '/Data/intent_without_resolutions.json'); |
@@ -8,8 +8,7 @@ |
||
8 | 8 | use MaxBeckers\AmazonAlexa\Intent\Slot; |
9 | 9 | use PHPUnit\Framework\TestCase; |
10 | 10 | |
11 | -class SlotTest extends TestCase |
|
12 | -{ |
|
11 | +class SlotTest extends TestCase { |
|
13 | 12 | public function testSlotMediaType(): void |
14 | 13 | { |
15 | 14 | $json = file_get_contents(__DIR__ . '/Data/slot_media_type.json'); |
@@ -17,8 +17,7 @@ discard block |
||
17 | 17 | use MaxBeckers\AmazonAlexa\Response\Response; |
18 | 18 | use PHPUnit\Framework\TestCase; |
19 | 19 | |
20 | -class RequestHandlerRegistryTest extends TestCase |
|
21 | -{ |
|
20 | +class RequestHandlerRegistryTest extends TestCase { |
|
22 | 21 | public function testSimpleRequest(): void |
23 | 22 | { |
24 | 23 | $responseHelper = new ResponseHelper(); |
@@ -96,8 +95,7 @@ discard block |
||
96 | 95 | } |
97 | 96 | } |
98 | 97 | |
99 | -class SimpleTestRequestHandler extends AbstractRequestHandler |
|
100 | -{ |
|
98 | +class SimpleTestRequestHandler extends AbstractRequestHandler { |
|
101 | 99 | public function __construct( |
102 | 100 | private readonly ResponseHelper $responseHelper |
103 | 101 | ) { |