Passed
Push — master ( 9f2c4f...e942df )
by Aleksei
17:57 queued 05:15
created
src/Core/tests/Internal/Resolver/UnionTypeParameterTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         $this->bindSingleton(DateTimeInterface::class, $time = new DateTimeImmutable());
21 21
 
22 22
         $result = $this->resolveClosure(
23
-            static fn(string|DateTimeInterface $time) => null,
23
+            static fn(string | DateTimeInterface $time) => null,
24 24
             []
25 25
         );
26 26
 
Please login to merge, or discard this patch.
src/Core/tests/Internal/Resolver/TypeValidationTest.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     public function testUnionType(): void
126 126
     {
127 127
         $this->validateClosureArguments(
128
-            fn (array|Traversable $a, array|Traversable $b) => null,
128
+            fn (array | Traversable $a, array | Traversable $b) => null,
129 129
             [[1, 2, NAN], new EmptyIterator()]
130 130
         );
131 131
     }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     public function testNullableUnionType(): void
134 134
     {
135 135
         $this->validateClosureArguments(
136
-            fn (null|array|Traversable $a, null|array|Traversable $b) => null,
136
+            fn (null | array | Traversable $a, null | array | Traversable $b) => null,
137 137
             [null, new EmptyIterator()]
138 138
         );
139 139
     }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     public function testWrongUnionType(): void
197 197
     {
198 198
         $this->validateClosureArguments(
199
-            fn (array|Traversable $a) => null,
199
+            fn (array | Traversable $a) => null,
200 200
             ['foo'],
201 201
             'a'
202 202
         );
@@ -329,14 +329,14 @@  discard block
 block discarded – undo
329 329
         ?string $invalidParameter = null,
330 330
         string $exceptionClass = InvalidArgumentException::class,
331 331
     ): void {
332
-        try {
332
+        try{
333 333
             $this->createResolver()->validateArguments(new ReflectionFunction($closure), $arguments);
334
-        } catch (ValidationException $e) {
334
+        }catch (ValidationException $e){
335 335
             $this->assertInstanceOf($exceptionClass, $e, 'Expected other exception.');
336
-            if ($invalidParameter === null) {
336
+            if ($invalidParameter === null){
337 337
                 throw $e;
338 338
             }
339
-            if ($e->getParameter() !== $invalidParameter) {
339
+            if ($e->getParameter() !== $invalidParameter){
340 340
                 $this->fail(
341 341
                     \sprintf(
342 342
                         'The other argument has been failed: `%s` instead of `%s`.',
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
             $this->assertTrue(true, 'Invalid value has been failed.');
349 349
             return;
350 350
         }
351
-        if ($invalidParameter === null) {
351
+        if ($invalidParameter === null){
352 352
             $this->assertTrue(true, 'Valid argument value has been failed.');
353 353
             return;
354 354
         }
Please login to merge, or discard this patch.
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -329,14 +329,19 @@  discard block
 block discarded – undo
329 329
         ?string $invalidParameter = null,
330 330
         string $exceptionClass = InvalidArgumentException::class,
331 331
     ): void {
332
-        try {
332
+        try
333
+        {
333 334
             $this->createResolver()->validateArguments(new ReflectionFunction($closure), $arguments);
334
-        } catch (ValidationException $e) {
335
+        }
336
+        catch (ValidationException $e)
337
+        {
335 338
             $this->assertInstanceOf($exceptionClass, $e, 'Expected other exception.');
336
-            if ($invalidParameter === null) {
339
+            if ($invalidParameter === null)
340
+            {
337 341
                 throw $e;
338 342
             }
339
-            if ($e->getParameter() !== $invalidParameter) {
343
+            if ($e->getParameter() !== $invalidParameter)
344
+            {
340 345
                 $this->fail(
341 346
                     \sprintf(
342 347
                         'The other argument has been failed: `%s` instead of `%s`.',
@@ -348,7 +353,8 @@  discard block
 block discarded – undo
348 353
             $this->assertTrue(true, 'Invalid value has been failed.');
349 354
             return;
350 355
         }
351
-        if ($invalidParameter === null) {
356
+        if ($invalidParameter === null)
357
+        {
352 358
             $this->assertTrue(true, 'Valid argument value has been failed.');
353 359
             return;
354 360
         }
Please login to merge, or discard this patch.
src/Core/tests/Internal/Resolver/NullableParameterTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
     public function testNullableUnionDefaultScalar(): void
84 84
     {
85 85
         $result = $this->resolveClosure(
86
-            static fn(null|int|string $param = 42) => $param
86
+            static fn(null | int | string $param = 42) => $param
87 87
         );
88 88
 
89 89
         $this->assertSame([42], $result);
Please login to merge, or discard this patch.
src/Core/tests/Internal/Destructor/FinalizerTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@
 block discarded – undo
12 12
 {
13 13
     public function testInternalServicesDontBlockContainer(): void
14 14
     {
15
-        (static function () {
15
+        (static function (){
16 16
             $container = new Container();
17 17
             $finalizer = new class {
18 18
                 public ?\Closure $closure = null;
19 19
                 public function __destruct()
20 20
                 {
21
-                    if ($this->closure !== null) {
21
+                    if ($this->closure !== null){
22 22
                         ($this->closure)();
23 23
                     }
24 24
                 }
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,18 +12,22 @@
 block discarded – undo
12 12
 {
13 13
     public function testInternalServicesDontBlockContainer(): void
14 14
     {
15
-        (static function () {
15
+        (static function ()
16
+        {
16 17
             $container = new Container();
17
-            $finalizer = new class {
18
+            $finalizer = new class
19
+            {
18 20
                 public ?\Closure $closure = null;
19 21
                 public function __destruct()
20 22
                 {
21
-                    if ($this->closure !== null) {
23
+                    if ($this->closure !== null)
24
+                    {
22 25
                         ($this->closure)();
23 26
                     }
24 27
                 }
25 28
             };
26
-            $finalizer->closure = static function () use ($container) {
29
+            $finalizer->closure = static function () use ($container)
30
+            {
27 31
                 $container->hasInstance('finalizer');
28 32
             };
29 33
             $container->bind('finalizer', $finalizer);
Please login to merge, or discard this patch.
src/Core/tests/Internal/Destructor/MemoryLeaksTest.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@
 block discarded – undo
36 36
     {
37 37
         $map = new WeakMap();
38 38
 
39
-        $fn = function (WeakMap $map) {
40
-            foreach ($this as $key => $value) {
41
-                if (\is_object($value)) {
39
+        $fn = function (WeakMap $map){
40
+            foreach ($this as $key => $value){
41
+                if (\is_object($value)){
42 42
                     $map->offsetSet($value, $key);
43 43
                 }
44 44
             }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,9 +36,12 @@
 block discarded – undo
36 36
     {
37 37
         $map = new WeakMap();
38 38
 
39
-        $fn = function (WeakMap $map) {
40
-            foreach ($this as $key => $value) {
41
-                if (\is_object($value)) {
39
+        $fn = function (WeakMap $map)
40
+        {
41
+            foreach ($this as $key => $value)
42
+            {
43
+                if (\is_object($value))
44
+                {
42 45
                     $map->offsetSet($value, $key);
43 46
                 }
44 47
             }
Please login to merge, or discard this patch.
src/Core/tests/Internal/Factory/CommonCasesTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
 
86 86
     public function testClosureFactory(): void
87 87
     {
88
-        $this->bind(Bucket::class, function ($data) {
88
+        $this->bind(Bucket::class, function ($data){
89 89
             return new Bucket('via-closure', $data);
90 90
         });
91 91
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,8 @@  discard block
 block discarded – undo
88 88
 
89 89
     public function testClosureFactory(): void
90 90
     {
91
-        $this->bind(Bucket::class, function ($data) {
91
+        $this->bind(Bucket::class, function ($data)
92
+        {
92 93
             return new Bucket('via-closure', $data);
93 94
         });
94 95
 
@@ -128,7 +129,8 @@  discard block
 block discarded – undo
128 129
         $sample = new SampleClass();
129 130
 
130 131
         $this->bind(Bucket::class, [Factory::class, 'makeBucketWithSample']);
131
-        $this->bind(SampleClass::class, function () use ($sample) {
132
+        $this->bind(SampleClass::class, function () use ($sample)
133
+        {
132 134
             return $sample;
133 135
         });
134 136
 
Please login to merge, or discard this patch.
src/Core/tests/Fixtures/TypedClass.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 bool $bool,
14 14
         public array $array = [],
15 15
         public ?string $pong = null
16
-    ) {
16
+    ){
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Core/tests/Stub/LightEngineDecorator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct(
10 10
         public LightEngine $engine
11
-    ) {
11
+    ){
12 12
     }
13 13
 
14 14
     public function __call(string $name, array $arguments)
Please login to merge, or discard this patch.
src/Core/tests/Stub/NewObjectInParam.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,6 +10,6 @@
 block discarded – undo
10 10
 {
11 11
     public function __construct(
12 12
         private object $object = new stdClass()
13
-    ) {
13
+    ){
14 14
     }
15 15
 }
Please login to merge, or discard this patch.