Passed
Push — master ( 8b0beb...b8f44e )
by Aleksei
10:34
created
src/Events/tests/AutowireListenerFactoryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 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
     {
Please login to merge, or discard this patch.
src/Boot/tests/BootloadManager/BootloadManagerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@
 block discarded – undo
33 33
             SampleBootWithMethodBoot::class,
34 34
             SampleBoot::class,
35 35
         ], [
36
-            static function(Container $container, SampleBoot $boot): void {
36
+            static function (Container $container, SampleBoot $boot): void {
37 37
                 $container->bind('efg', $boot);
38 38
             }
39 39
         ], [
40
-            static function(Container $container, SampleBoot $boot): void {
40
+            static function (Container $container, SampleBoot $boot): void {
41 41
                 $container->bind('ghi', $boot);
42 42
             }
43 43
         ]);
Please login to merge, or discard this patch.
src/Boot/tests/BootloadManager/BootloadersTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
             SampleBootWithMethodBoot::class,
27 27
             SampleBoot::class,
28 28
         ], [
29
-            static function(Container $container, SampleBoot $boot): void {
29
+            static function (Container $container, SampleBoot $boot): void {
30 30
                 $container->bind('efg', $boot);
31 31
             }
32 32
         ], [
33
-            static function(Container $container, SampleBoot $boot): void {
33
+            static function (Container $container, SampleBoot $boot): void {
34 34
                 $container->bind('ghi', $boot);
35 35
             }
36 36
         ]);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $bootloader = $this->getBootloadManager();
82 82
 
83 83
         $bootloader->bootload([
84
-            new class () extends Bootloader {
84
+            new class () extends Bootloader{
85 85
                 public const BINDINGS = ['abc' => self::class];
86 86
                 public const SINGLETONS = ['single' => self::class];
87 87
 
Please login to merge, or discard this patch.
src/Boot/tests/KernelTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $kernel = TestCore::create(['root' => __DIR__])->run();
49 49
 
50
-        $d = new class() implements DispatcherInterface {
50
+        $d = new class() implements DispatcherInterface{
51 51
             public static function canServe(EnvironmentInterface $env): bool
52 52
             {
53 53
                 return true;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $kernel = TestCore::create(['root' => __DIR__])->run();
69 69
 
70
-        $d = new class() implements DispatcherInterface {
70
+        $d = new class() implements DispatcherInterface{
71 71
             public function canServe(): bool
72 72
             {
73 73
                 return true;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $kernel = TestCore::create(['root' => __DIR__])->run();
92 92
 
93
-        $d = new class() implements DispatcherInterface {
93
+        $d = new class() implements DispatcherInterface{
94 94
             public static function canServe(EnvironmentInterface $env): bool
95 95
             {
96 96
                 return true;
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
             $core->getContainer()->bind('bcd', 'foo');
133 133
         });
134 134
 
135
-        $kernel->booted( static function (TestCore $core): void {
135
+        $kernel->booted(static function (TestCore $core): void {
136 136
             $core->getContainer()->bind('cde', 'foo');
137 137
         });
138 138
 
139
-        $kernel->booted( static function (TestCore $core): void {
139
+        $kernel->booted(static function (TestCore $core): void {
140 140
             $core->getContainer()->bind('def', 'foo');
141 141
         });
142 142
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
     public function testEventsShouldBeDispatched(): void
161 161
     {
162
-        $testDispatcher = new class implements DispatcherInterface {
162
+        $testDispatcher = new class implements DispatcherInterface{
163 163
             public static function canServe(EnvironmentInterface $env): bool
164 164
             {
165 165
                 return true;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         };
172 172
 
173 173
         $container = new Container();
174
-        $kernel = TestCore::create(directories: ['root' => __DIR__,], container: $container)
174
+        $kernel = TestCore::create(directories: ['root' => __DIR__, ], container: $container)
175 175
             ->addDispatcher($testDispatcher);
176 176
 
177 177
         $dispatcher = $this->createMock(EventDispatcherInterface::class);
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     public function testDispatcherNotFoundEventShouldBeDispatched(): void
193 193
     {
194 194
         $container = new Container();
195
-        $kernel = TestCore::create(directories: ['root' => __DIR__,], container: $container);
195
+        $kernel = TestCore::create(directories: ['root' => __DIR__, ], container: $container);
196 196
 
197 197
         $dispatcher = $this->createMock(EventDispatcherInterface::class);
198 198
         $dispatcher
Please login to merge, or discard this patch.
src/Logger/tests/FactoryTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function testInjection(): void
50 50
     {
51
-        $factory = new class () implements LogsInterface {
51
+        $factory = new class () implements LogsInterface{
52 52
             public function getLogger(string $channel): LoggerInterface
53 53
             {
54 54
                 $mock = \Mockery::mock(LoggerInterface::class);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function testInjectionNullableChannel(): void
67 67
     {
68
-        $factory = new class () implements LogsInterface {
68
+        $factory = new class () implements LogsInterface{
69 69
             public function getLogger(?string $channel): LoggerInterface
70 70
             {
71 71
                 $mock = \Mockery::mock(LoggerInterface::class);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
     public function testInjectionWithAttribute(): void
84 84
     {
85
-        $factory = new class () implements LogsInterface {
85
+        $factory = new class () implements LogsInterface{
86 86
             public function getLogger(?string $channel): LoggerInterface
87 87
             {
88 88
                 $mock = \Mockery::mock(LoggerInterface::class);
Please login to merge, or discard this patch.
src/Queue/tests/Interceptor/Push/CoreTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             $queue = m::mock(QueueInterface::class)
25 25
         );
26 26
 
27
-        if (!\is_array($payload)) {
27
+        if (!\is_array($payload)){
28 28
             $this->markTestIncomplete('QueueInterface does not support non-array payloads');
29 29
             return;
30 30
         }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             $queue = m::mock(QueueInterface::class)
50 50
         );
51 51
 
52
-        if (!\is_array($payload)) {
52
+        if (!\is_array($payload)){
53 53
             $this->markTestIncomplete('QueueInterface does not support non-array payloads');
54 54
             return;
55 55
         }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                 && $payload === ['baz' => 'baf']
85 85
                 && $options->getHeader('foo') === ['bar']);
86 86
 
87
-        ContainerScope::runScope($container, function() use($core): void {
87
+        ContainerScope::runScope($container, function () use($core): void {
88 88
             $core->callAction('foo', 'bar', [
89 89
                 'id' => 'job-id',
90 90
                 'payload' => ['baz' => 'baf'],
Please login to merge, or discard this patch.
src/Tokenizer/src/AbstractLocator.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public function __construct(
26 26
         protected Finder $finder,
27 27
         protected readonly bool $debug = false,
28
-    ) {
28
+    ){
29 29
     }
30 30
 
31 31
     /**
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
      */
38 38
     protected function availableReflections(): \Generator
39 39
     {
40
-        foreach ($this->finder->getIterator() as $file) {
40
+        foreach ($this->finder->getIterator() as $file){
41 41
             $reflection = new ReflectionFile((string)$file);
42 42
 
43
-            if ($reflection->hasIncludes()) {
43
+            if ($reflection->hasIncludes()){
44 44
                 // We are not analyzing files which has includes, it's not safe to require such reflections
45
-                if ($this->debug) {
45
+                if ($this->debug){
46 46
                     $this->getLogger()->warning(
47
-                        \sprintf('File `%s` has includes and excluded from analysis', (string) $file),
47
+                        \sprintf('File `%s` has includes and excluded from analysis', (string)$file),
48 48
                         ['file' => $file]
49 49
                     );
50 50
                 }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     protected function classReflection(string $class): \ReflectionClass
70 70
     {
71 71
         $loader = static function ($class): void {
72
-            if ($class === LocatorException::class) {
72
+            if ($class === LocatorException::class){
73 73
                 return;
74 74
             }
75 75
 
@@ -79,24 +79,24 @@  discard block
 block discarded – undo
79 79
         //To suspend class dependency exception
80 80
         \spl_autoload_register($loader);
81 81
 
82
-        try {
82
+        try{
83 83
             //In some cases reflection can thrown an exception if class invalid or can not be loaded,
84 84
             //we are going to handle such exception and convert it soft exception
85 85
             return new \ReflectionClass($class);
86
-        } catch (\Throwable $e) {
87
-            if ($e instanceof LocatorException && $e->getPrevious() != null) {
86
+        }catch (\Throwable $e){
87
+            if ($e instanceof LocatorException && $e->getPrevious() != null){
88 88
                 $e = $e->getPrevious();
89 89
             }
90 90
 
91
-            if ($this->debug) {
91
+            if ($this->debug){
92 92
                 $this->getLogger()->error(
93 93
                     \sprintf('%s: %s in %s:%s', $class, $e->getMessage(), $e->getFile(), $e->getLine()),
94 94
                     ['error' => $e]
95 95
                 );
96 96
             }
97 97
 
98
-            throw new LocatorException($e->getMessage(), (int) $e->getCode(), $e);
99
-        } finally {
98
+            throw new LocatorException($e->getMessage(), (int)$e->getCode(), $e);
99
+        }finally{
100 100
             \spl_autoload_unregister($loader);
101 101
         }
102 102
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     protected function enumReflection(string $enum): \ReflectionEnum
113 113
     {
114 114
         $loader = static function (string $enum): void {
115
-            if ($enum === LocatorException::class) {
115
+            if ($enum === LocatorException::class){
116 116
                 return;
117 117
             }
118 118
 
@@ -122,24 +122,24 @@  discard block
 block discarded – undo
122 122
         //To suspend class dependency exception
123 123
         \spl_autoload_register($loader);
124 124
 
125
-        try {
125
+        try{
126 126
             //In some enum reflection can thrown an exception if enum invalid or can not be loaded,
127 127
             //we are going to handle such exception and convert it soft exception
128 128
             return new \ReflectionEnum($enum);
129
-        } catch (\Throwable $e) {
130
-            if ($e instanceof LocatorException && $e->getPrevious() != null) {
129
+        }catch (\Throwable $e){
130
+            if ($e instanceof LocatorException && $e->getPrevious() != null){
131 131
                 $e = $e->getPrevious();
132 132
             }
133 133
 
134
-            if ($this->debug) {
134
+            if ($this->debug){
135 135
                 $this->getLogger()->error(
136 136
                     \sprintf('%s: %s in %s:%s', $enum, $e->getMessage(), $e->getFile(), $e->getLine()),
137 137
                     ['error' => $e]
138 138
                 );
139 139
             }
140 140
 
141
-            throw new LocatorException($e->getMessage(), (int) $e->getCode(), $e);
142
-        } finally {
141
+            throw new LocatorException($e->getMessage(), (int)$e->getCode(), $e);
142
+        }finally{
143 143
             \spl_autoload_unregister($loader);
144 144
         }
145 145
     }
Please login to merge, or discard this patch.
src/Core/tests/Scope/FinalizeAttributeTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $root = self::makeContainer();
23 23
 
24
-        $obj = $root->runScoped(static function (Container $c1) {
25
-            $obj = $c1->runScoped(static function (Container $c2) {
24
+        $obj = $root->runScoped(static function (Container $c1){
25
+            $obj = $c1->runScoped(static function (Container $c2){
26 26
                 $obj = $c2->get(AttrScopeFooFinalize::class);
27 27
 
28 28
                 self::assertFalse($obj->finalized);
@@ -124,12 +124,12 @@  discard block
 block discarded – undo
124 124
         self::expectException(FinalizersException::class);
125 125
         self::expectExceptionMessage('An exception has been thrown during finalization of the scope `foo`');
126 126
 
127
-        try {
127
+        try{
128 128
             $root->runScoped(static function (Container $c1): void {
129 129
                 $obj = $c1->get(AttrScopeFooFinalize::class);
130 130
                 $obj->throwException = true;
131 131
             }, name: 'foo');
132
-        } catch (FinalizersException $e) {
132
+        }catch (FinalizersException $e){
133 133
             self::assertSame('foo', $e->getScope());
134 134
             self::assertCount(1, $e->getExceptions());
135 135
             // Contains the message from the inner exception.
@@ -153,13 +153,13 @@  discard block
 block discarded – undo
153 153
         self::expectException(FinalizersException::class);
154 154
         self::expectExceptionMessage('3 exceptions have been thrown during finalization of the scope `foo`');
155 155
 
156
-        try {
156
+        try{
157 157
             $root->runScoped(static function (Container $c1): void {
158 158
                 $c1->get(AttrScopeFooFinalize::class)->throwException = true;
159 159
                 $c1->get(AttrScopeFooFinalize::class)->throwException = true;
160 160
                 $c1->get(AttrScopeFooFinalize::class)->throwException = true;
161 161
             }, name: 'foo');
162
-        } catch (FinalizersException $e) {
162
+        }catch (FinalizersException $e){
163 163
             self::assertSame('foo', $e->getScope());
164 164
             self::assertCount(3, $e->getExceptions());
165 165
             // Contains the message from the inner exception.
Please login to merge, or discard this patch.
src/Core/tests/Scope/ScopeAttributeTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
         $root = self::makeContainer();
167 167
 
168
-        try {
168
+        try{
169 169
             $root->runScoped(static function (Container $c1): void {
170 170
                 $c1->runScoped(static function (Container $c2): void {
171 171
                     $c2->runScoped(static function (Container $c3): void {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                     }, name: 'root');
174 174
                 });
175 175
             });
176
-        } catch (NamedScopeDuplicationException $e) {
176
+        }catch (NamedScopeDuplicationException $e){
177 177
             self::assertSame('root', $e->getScope());
178 178
             throw $e;
179 179
         }
@@ -188,14 +188,14 @@  discard block
 block discarded – undo
188 188
     {
189 189
         self::expectException(BadScopeException::class);
190 190
 
191
-        try {
191
+        try{
192 192
             $root = self::makeContainer();
193 193
             $root->runScoped(static function (Container $c1): void {
194 194
                 $c1->runScoped(static function (Container $c2): void {
195 195
                     $c2->get(AttrScopeFoo::class);
196 196
                 });
197 197
             }, name: 'bar');
198
-        } catch (BadScopeException $e) {
198
+        }catch (BadScopeException $e){
199 199
             self::assertSame('foo', $e->getScope());
200 200
             throw $e;
201 201
         }
Please login to merge, or discard this patch.