@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $this->expectExceptionMessage('Enum `Spiral\Tests\Core\Stub\EnumObject` can not be constructed.'); |
64 | 64 | |
65 | 65 | $this->resolveClosure( |
66 | - static function (EnumObject $enum) {}, |
|
66 | + static function (EnumObject $enum){}, |
|
67 | 67 | ); |
68 | 68 | } |
69 | 69 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | ); |
76 | 76 | |
77 | 77 | $this->resolveClosure( |
78 | - static function (TestTrait $enum) {}, |
|
78 | + static function (TestTrait $enum){}, |
|
79 | 79 | ); |
80 | 80 | } |
81 | 81 | } |
@@ -63,7 +63,9 @@ discard block |
||
63 | 63 | $this->expectExceptionMessage('Enum `Spiral\Tests\Core\Stub\EnumObject` can not be constructed.'); |
64 | 64 | |
65 | 65 | $this->resolveClosure( |
66 | - static function (EnumObject $enum) {}, |
|
66 | + static function (EnumObject $enum) |
|
67 | + { |
|
68 | +}, |
|
67 | 69 | ); |
68 | 70 | } |
69 | 71 | |
@@ -75,7 +77,9 @@ discard block |
||
75 | 77 | ); |
76 | 78 | |
77 | 79 | $this->resolveClosure( |
78 | - static function (TestTrait $enum) {}, |
|
80 | + static function (TestTrait $enum) |
|
81 | + { |
|
82 | +}, |
|
79 | 83 | ); |
80 | 84 | } |
81 | 85 | } |
@@ -32,13 +32,13 @@ |
||
32 | 32 | * @param non-empty-string $name |
33 | 33 | * @param non-empty-string|array<non-empty-string> $value |
34 | 34 | */ |
35 | - public function withHeader(string $name, string|array $value): self; |
|
35 | + public function withHeader(string $name, string | array $value): self; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * @param non-empty-string $name |
39 | 39 | * @param non-empty-string|array<non-empty-string> $value |
40 | 40 | */ |
41 | - public function withAddedHeader(string $name, string|array $value): self; |
|
41 | + public function withAddedHeader(string $name, string | array $value): self; |
|
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @param non-empty-string $name |
@@ -12,16 +12,16 @@ |
||
12 | 12 | { |
13 | 13 | public function __construct( |
14 | 14 | private readonly InvokerInterface $invoker |
15 | - ) { |
|
15 | + ){ |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function handle(string $name, string $id, array $payload, array $headers = []): void |
19 | 19 | { |
20 | - if (!isset($payload['callback'])) { |
|
20 | + if (!isset($payload['callback'])){ |
|
21 | 21 | throw new InvalidArgumentException('Payload `callback` key is required.'); |
22 | 22 | } |
23 | 23 | |
24 | - if (!$payload['callback'] instanceof \Closure) { |
|
24 | + if (!$payload['callback'] instanceof \Closure){ |
|
25 | 25 | throw new InvalidArgumentException('Payload `callback` key value type should be a closure.'); |
26 | 26 | } |
27 | 27 |
@@ -17,11 +17,13 @@ |
||
17 | 17 | |
18 | 18 | public function handle(string $name, string $id, array $payload, array $headers = []): void |
19 | 19 | { |
20 | - if (!isset($payload['callback'])) { |
|
20 | + if (!isset($payload['callback'])) |
|
21 | + { |
|
21 | 22 | throw new InvalidArgumentException('Payload `callback` key is required.'); |
22 | 23 | } |
23 | 24 | |
24 | - if (!$payload['callback'] instanceof \Closure) { |
|
25 | + if (!$payload['callback'] instanceof \Closure) |
|
26 | + { |
|
25 | 27 | throw new InvalidArgumentException('Payload `callback` key value type should be a closure.'); |
26 | 28 | } |
27 | 29 |
@@ -12,16 +12,16 @@ |
||
12 | 12 | { |
13 | 13 | public function __construct( |
14 | 14 | private readonly InvokerInterface $invoker |
15 | - ) { |
|
15 | + ){ |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function handle(string $name, string $id, array $payload, array $headers = []): void |
19 | 19 | { |
20 | - if (!isset($payload['object'])) { |
|
20 | + if (!isset($payload['object'])){ |
|
21 | 21 | throw new InvalidArgumentException('Payload `object` key is required.'); |
22 | 22 | } |
23 | 23 | |
24 | - if (!\is_object($payload['object'])) { |
|
24 | + if (!\is_object($payload['object'])){ |
|
25 | 25 | throw new InvalidArgumentException('Payload `object` key value type should be an object.'); |
26 | 26 | } |
27 | 27 |
@@ -17,11 +17,13 @@ |
||
17 | 17 | |
18 | 18 | public function handle(string $name, string $id, array $payload, array $headers = []): void |
19 | 19 | { |
20 | - if (!isset($payload['object'])) { |
|
20 | + if (!isset($payload['object'])) |
|
21 | + { |
|
21 | 22 | throw new InvalidArgumentException('Payload `object` key is required.'); |
22 | 23 | } |
23 | 24 | |
24 | - if (!\is_object($payload['object'])) { |
|
25 | + if (!\is_object($payload['object'])) |
|
26 | + { |
|
25 | 27 | throw new InvalidArgumentException('Payload `object` key value type should be an object.'); |
26 | 28 | } |
27 | 29 |
@@ -64,7 +64,7 @@ |
||
64 | 64 | $config = new EventsConfig([ |
65 | 65 | 'interceptors' => [ |
66 | 66 | 'bar', |
67 | - new class implements CoreInterceptorInterface { |
|
67 | + new class implements CoreInterceptorInterface{ |
|
68 | 68 | public function process(string $controller, string $action, array $parameters, CoreInterface $core): mixed |
69 | 69 | { |
70 | 70 | } |
@@ -64,7 +64,8 @@ |
||
64 | 64 | $config = new EventsConfig([ |
65 | 65 | 'interceptors' => [ |
66 | 66 | 'bar', |
67 | - new class implements CoreInterceptorInterface { |
|
67 | + new class implements CoreInterceptorInterface |
|
68 | + { |
|
68 | 69 | public function process(string $controller, string $action, array $parameters, CoreInterface $core): mixed |
69 | 70 | { |
70 | 71 | } |
@@ -13,7 +13,9 @@ |
||
13 | 13 | { |
14 | 14 | public function testDispatch(): void |
15 | 15 | { |
16 | - $event = new class() {}; |
|
16 | + $event = new class() |
|
17 | + { |
|
18 | +}; |
|
17 | 19 | |
18 | 20 | $core = m::mock(CoreInterface::class); |
19 | 21 | $core |
@@ -13,7 +13,9 @@ |
||
13 | 13 | { |
14 | 14 | public function testCallAction(): void |
15 | 15 | { |
16 | - $event = new class() {}; |
|
16 | + $event = new class() |
|
17 | + { |
|
18 | +}; |
|
17 | 19 | |
18 | 20 | $dispatcher = m::mock(EventDispatcherInterface::class); |
19 | 21 | $dispatcher |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function __construct( |
13 | 13 | private readonly CoreInterface $core |
14 | - ) { |
|
14 | + ){ |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | public function dispatch(object $event): object |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | public function __construct( |
16 | 16 | private readonly EventDispatcherInterface $dispatcher |
17 | - ) { |
|
17 | + ){ |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |