Test Failed
Pull Request — master (#1163)
by Abdul Malik
10:57
created
src/Filters/src/Model/FilterBag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
         public readonly AbstractEntity $entity,
14 14
         public readonly array $schema = [],
15 15
         public readonly array $errors = [],
16
-    ) {
16
+    ){
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Filters/src/Model/Interceptor/PopulateDataFromEntityInterceptor.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
         $bag = $parameters['filterBag'];
26 26
 
27
-        if ($bag->filter instanceof Filter) {
27
+        if ($bag->filter instanceof Filter){
28 28
             $bag->filter->setData($bag->entity->toArray());
29 29
         }
30 30
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,8 @@
 block discarded – undo
24 24
 
25 25
         $bag = $parameters['filterBag'];
26 26
 
27
-        if ($bag->filter instanceof Filter) {
27
+        if ($bag->filter instanceof Filter)
28
+        {
28 29
             $bag->filter->setData($bag->entity->toArray());
29 30
         }
30 31
 
Please login to merge, or discard this patch.
src/Events/tests/AutowireListenerFactoryTest.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 
23 23
     private FooEvent $ev;
24 24
     private AutowireListenerFactory $factory;
25
-    private ContainerInterface|MockInterface $container;
26
-    private ClassAndMethodAttribute|MockInterface $listener;
25
+    private ContainerInterface | MockInterface $container;
26
+    private ClassAndMethodAttribute | MockInterface $listener;
27 27
 
28 28
     protected function setUp(): void
29 29
     {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
         $this->listener->shouldReceive('onFooEvent')->once()->with($this->ev);
46 46
 
47
-        ContainerScope::runScope($this->container, function () {
47
+        ContainerScope::runScope($this->container, function (){
48 48
             $listener = $this->factory->create(ClassAndMethodAttribute::class, 'onFooEvent');
49 49
             $listener($this->ev);
50 50
         });
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $this->listener->shouldReceive('onFooEvent')->once()->with($this->ev);
56 56
 
57
-        ContainerScope::runScope($this->container, function () {
57
+        ContainerScope::runScope($this->container, function (){
58 58
             $listener = $this->factory->create($this->listener, 'onFooEvent');
59 59
             $listener($this->ev);
60 60
         });
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             ->once()
77 77
             ->with([$this->listener, 'onFooEventWithTwoArguments'], ['event' => $this->ev]);
78 78
 
79
-        ContainerScope::runScope($this->container, function () {
79
+        ContainerScope::runScope($this->container, function (){
80 80
             $listener = $this->factory->create(ClassAndMethodAttribute::class, 'onFooEventWithTwoArguments');
81 81
             $listener($this->ev);
82 82
         });
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             ->once()
94 94
             ->with([$this->listener, 'onFooEventWithTwoArguments'], ['event' => $this->ev]);
95 95
 
96
-        ContainerScope::runScope($this->container, function () {
96
+        ContainerScope::runScope($this->container, function (){
97 97
             $listener = $this->factory->create($this->listener, 'onFooEventWithTwoArguments');
98 98
             $listener($this->ev);
99 99
         });
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             'Listener `Spiral\Tests\Events\Fixtures\Listener\ClassAndMethodAttribute` does not contain `test` method.'
107 107
         );
108 108
 
109
-        ContainerScope::runScope($this->container, function () {
109
+        ContainerScope::runScope($this->container, function (){
110 110
             $this->factory->create(ClassAndMethodAttribute::class, 'test');
111 111
         });
112 112
     }
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,7 +44,8 @@  discard block
 block discarded – undo
44 44
 
45 45
         $this->listener->shouldReceive('onFooEvent')->once()->with($this->ev);
46 46
 
47
-        ContainerScope::runScope($this->container, function () {
47
+        ContainerScope::runScope($this->container, function ()
48
+        {
48 49
             $listener = $this->factory->create(ClassAndMethodAttribute::class, 'onFooEvent');
49 50
             $listener($this->ev);
50 51
         });
@@ -54,7 +55,8 @@  discard block
 block discarded – undo
54 55
     {
55 56
         $this->listener->shouldReceive('onFooEvent')->once()->with($this->ev);
56 57
 
57
-        ContainerScope::runScope($this->container, function () {
58
+        ContainerScope::runScope($this->container, function ()
59
+        {
58 60
             $listener = $this->factory->create($this->listener, 'onFooEvent');
59 61
             $listener($this->ev);
60 62
         });
@@ -76,7 +78,8 @@  discard block
 block discarded – undo
76 78
             ->once()
77 79
             ->with([$this->listener, 'onFooEventWithTwoArguments'], ['event' => $this->ev]);
78 80
 
79
-        ContainerScope::runScope($this->container, function () {
81
+        ContainerScope::runScope($this->container, function ()
82
+        {
80 83
             $listener = $this->factory->create(ClassAndMethodAttribute::class, 'onFooEventWithTwoArguments');
81 84
             $listener($this->ev);
82 85
         });
@@ -93,7 +96,8 @@  discard block
 block discarded – undo
93 96
             ->once()
94 97
             ->with([$this->listener, 'onFooEventWithTwoArguments'], ['event' => $this->ev]);
95 98
 
96
-        ContainerScope::runScope($this->container, function () {
99
+        ContainerScope::runScope($this->container, function ()
100
+        {
97 101
             $listener = $this->factory->create($this->listener, 'onFooEventWithTwoArguments');
98 102
             $listener($this->ev);
99 103
         });
@@ -106,7 +110,8 @@  discard block
 block discarded – undo
106 110
             'Listener `Spiral\Tests\Events\Fixtures\Listener\ClassAndMethodAttribute` does not contain `test` method.'
107 111
         );
108 112
 
109
-        ContainerScope::runScope($this->container, function () {
113
+        ContainerScope::runScope($this->container, function ()
114
+        {
110 115
             $this->factory->create(ClassAndMethodAttribute::class, 'test');
111 116
         });
112 117
     }
Please login to merge, or discard this patch.
src/Events/tests/Fixtures/Event/FooEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct(
10 10
         public readonly string $some
11
-    ) {
11
+    ){
12 12
     }
13 13
 }
Please login to merge, or discard this patch.
src/Events/tests/Fixtures/Listener/ClassAttributeUnionType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 #[Listener]
12 12
 final class ClassAttributeUnionType
13 13
 {
14
-    public function __invoke(FooEvent|BarEvent $event): void
14
+    public function __invoke(FooEvent | BarEvent $event): void
15 15
     {
16 16
     }
17 17
 }
Please login to merge, or discard this patch.
src/Events/tests/Fixtures/Listener/ClassDoubleTheSameAttribute.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 #[Listener]
13 13
 final class ClassDoubleTheSameAttribute
14 14
 {
15
-    public function __invoke(FooEvent|BarEvent $event): void
15
+    public function __invoke(FooEvent | BarEvent $event): void
16 16
     {
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Events/src/Attribute/Listener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,6 +17,6 @@
 block discarded – undo
17 17
         public readonly ?string $event = null,
18 18
         public ?string $method = null,
19 19
         public readonly int $priority = 0
20
-    ) {
20
+    ){
21 21
     }
22 22
 }
Please login to merge, or discard this patch.
src/Events/src/Config/EventListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
         public string $listener,
15 15
         ?string $method = null,
16 16
         public int $priority = 0
17
-    ) {
17
+    ){
18 18
         $this->method = !empty($method) ? $method : self::DEFAULT_METHOD;
19 19
     }
20 20
 }
Please login to merge, or discard this patch.
src/Events/src/Config/EventsConfig.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function getListeners(): array
34 34
     {
35 35
         $listeners = [];
36
-        foreach ($this->config['listeners'] as $event => $eventListeners) {
36
+        foreach ($this->config['listeners'] as $event => $eventListeners){
37 37
             $listeners[$event] = \array_map(
38 38
                 self::normalizeListener(...),
39 39
                 $eventListeners
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     /**
55 55
      * @param TListener $listener
56 56
      */
57
-    private static function normalizeListener(string|EventListener $listener): EventListener
57
+    private static function normalizeListener(string | EventListener $listener): EventListener
58 58
     {
59 59
         return \is_string($listener) ? new EventListener($listener) : $listener;
60 60
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,8 @@
 block discarded – undo
33 33
     public function getListeners(): array
34 34
     {
35 35
         $listeners = [];
36
-        foreach ($this->config['listeners'] as $event => $eventListeners) {
36
+        foreach ($this->config['listeners'] as $event => $eventListeners)
37
+        {
37 38
             $listeners[$event] = \array_map(
38 39
                 self::normalizeListener(...),
39 40
                 $eventListeners
Please login to merge, or discard this patch.