Passed
Push — master ( c81bf2...c3afe7 )
by Aleksei
09:08 queued 01:17
created
src/Http/src/Request/FilesBag.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
     /**
21 21
      * Locale local filename (virtual filename) associated with UploadedFile resource.
22 22
      */
23
-    public function getFilename(int|string $name): ?string
23
+    public function getFilename(int | string $name): ?string
24 24
     {
25
-        if (!empty($file = $this->get($name)) && !$file->getError()) {
25
+        if (!empty($file = $this->get($name)) && !$file->getError()){
26 26
             return StreamWrapper::getFilename($file->getStream());
27 27
         }
28 28
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,8 @@
 block discarded – undo
22 22
      */
23 23
     public function getFilename(int|string $name): ?string
24 24
     {
25
-        if (!empty($file = $this->get($name)) && !$file->getError()) {
25
+        if (!empty($file = $this->get($name)) && !$file->getError())
26
+        {
26 27
             return StreamWrapper::getFilename($file->getStream());
27 28
         }
28 29
 
Please login to merge, or discard this patch.
src/Http/src/Request/HeadersBag.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,8 @@  discard block
 block discarded – undo
22 22
     {
23 23
         $value = parent::get($this->normalize((string) $name), $default);
24 24
 
25
-        if (\is_string($implode) && !empty($implode) && \is_array($value)) {
25
+        if (\is_string($implode) && !empty($implode) && \is_array($value))
26
+        {
26 27
             return \implode($implode, $value);
27 28
         }
28 29
 
@@ -38,8 +39,10 @@  discard block
 block discarded – undo
38 39
 
39 40
         $values = parent::fetch($keys, $fill, $filler);
40 41
 
41
-        if (!empty($implode)) {
42
-            foreach ($values as &$value) {
42
+        if (!empty($implode))
43
+        {
44
+            foreach ($values as &$value)
45
+            {
43 46
                 $value = \implode($implode, $value);
44 47
                 unset($value);
45 48
             }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,19 +10,19 @@  discard block
 block discarded – undo
10 10
  */
11 11
 final class HeadersBag extends InputBag
12 12
 {
13
-    public function has(int|string $name): bool
13
+    public function has(int | string $name): bool
14 14
     {
15
-        return parent::has($this->normalize((string) $name));
15
+        return parent::has($this->normalize((string)$name));
16 16
     }
17 17
 
18 18
     /**
19 19
      * @param false|string $implode Implode header lines, false to return header as array.
20 20
      */
21
-    public function get(int|string $name, mixed $default = null, bool|string $implode = ','): array|string|null
21
+    public function get(int | string $name, mixed $default = null, bool | string $implode = ','): array | string | null
22 22
     {
23
-        $value = parent::get($this->normalize((string) $name), $default);
23
+        $value = parent::get($this->normalize((string)$name), $default);
24 24
 
25
-        if (\is_string($implode) && !empty($implode) && \is_array($value)) {
25
+        if (\is_string($implode) && !empty($implode) && \is_array($value)){
26 26
             return \implode($implode, $value);
27 27
         }
28 28
 
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function fetch(array $keys, bool $fill = false, mixed $filler = null, ?string $implode = ','): array
36 36
     {
37
-        $keys = \array_map(fn(string $header): string => $this->normalize($header), $keys);
37
+        $keys = \array_map(fn(string $header) : string => $this->normalize($header), $keys);
38 38
 
39 39
         $values = parent::fetch($keys, $fill, $filler);
40 40
 
41
-        if (!empty($implode)) {
42
-            foreach ($values as &$value) {
41
+        if (!empty($implode)){
42
+            foreach ($values as &$value){
43 43
                 $value = \implode($implode, $value);
44 44
                 unset($value);
45 45
             }
Please login to merge, or discard this patch.
src/SendIt/src/Bootloader/BuilderBootloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,6 +25,6 @@
 block discarded – undo
25 25
 
26 26
     public function init(ViewsBootloader $views): void
27 27
     {
28
-        $views->addDirectory('sendit', __DIR__ . '/../../views');
28
+        $views->addDirectory('sendit', __DIR__.'/../../views');
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
src/AuthHttp/src/TransportRegistry.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         $name ??= $this->default;
31 31
 
32
-        if (!isset($this->transports[$name])) {
32
+        if (!isset($this->transports[$name])){
33 33
             throw new TransportException(\sprintf('Undefined auth transport %s', $name));
34 34
         }
35 35
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,8 @@
 block discarded – undo
29 29
     {
30 30
         $name ??= $this->default;
31 31
 
32
-        if (!isset($this->transports[$name])) {
32
+        if (!isset($this->transports[$name]))
33
+        {
33 34
             throw new TransportException(\sprintf('Undefined auth transport %s', $name));
34 35
         }
35 36
 
Please login to merge, or discard this patch.
src/Filters/tests/Model/Schema/AttributeMapperTest.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,8 @@  discard block
 block discarded – undo
69 69
             ->andReturn(['first' => ['foo' => 'bar'], 'second' => ['foo' => 'baz']]);
70 70
 
71 71
         [$schema, $errors] = $this->mapper->map(
72
-            $filter = new class implements FilterInterface {
72
+            $filter = new class implements FilterInterface
73
+            {
73 74
                 #[Post]
74 75
                 public string $username;
75 76
 
@@ -165,7 +166,8 @@  discard block
 block discarded – undo
165 166
             ->andReturn(['first' => ['foo' => 'bar'], 'second' => ['foo' => 'baz']]);
166 167
 
167 168
         [$schema, $errors] = $this->mapper->map(
168
-            $filter = new class implements FilterInterface {
169
+            $filter = new class implements FilterInterface
170
+            {
169 171
                 #[Post]
170 172
                 public string $username;
171 173
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 final class AttributeMapperTest extends BaseTestCase
28 28
 {
29
-    private m\LegacyMockInterface|m\MockInterface|FilterProviderInterface $provider;
29
+    private m\LegacyMockInterface | m\MockInterface | FilterProviderInterface $provider;
30 30
     private AttributeMapper $mapper;
31 31
 
32 32
     public function testInputAttribute(): void
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             ->andReturn(['first' => ['foo' => 'bar'], 'second' => ['foo' => 'baz']]);
64 64
 
65 65
         [$schema, $errors] = $this->mapper->map(
66
-            $filter = new class implements FilterInterface {
66
+            $filter = new class implements FilterInterface{
67 67
                 #[Post]
68 68
                 public string $username;
69 69
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             ->andReturn(['first' => ['foo' => 'bar'], 'second' => ['foo' => 'baz']]);
160 160
 
161 161
         [$schema, $errors] = $this->mapper->map(
162
-            $filter = new class implements FilterInterface {
162
+            $filter = new class implements FilterInterface{
163 163
                 #[Post]
164 164
                 public string $username;
165 165
 
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/src/Processor/AbstractProcessor.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     protected function getEventFromTypeDeclaration(\ReflectionMethod $method): array
18 18
     {
19
-        if ($method->getNumberOfParameters() > 1) {
19
+        if ($method->getNumberOfParameters() > 1){
20 20
             throw $this->badClassMethod($method->class, $method->getName());
21 21
         }
22 22
         $type = $method->getParameters()[0]->getType();
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
         };
30 30
 
31 31
         $result = [];
32
-        foreach ($eventTypes as $type) {
33
-            if ($type->isBuiltin()) {
32
+        foreach ($eventTypes as $type){
33
+            if ($type->isBuiltin()){
34 34
                 continue;
35 35
             }
36 36
             $result[] = $type->getName();
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
      */
45 45
     protected function getMethod(string $class, string $name): \ReflectionMethod
46 46
     {
47
-        try {
47
+        try{
48 48
             return new \ReflectionMethod($class, $name);
49
-        } catch (\ReflectionException) {
49
+        }catch (\ReflectionException){
50 50
             throw $this->badClassMethod($class, $name);
51 51
         }
52 52
     }
Please login to merge, or discard this patch.
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,7 +16,8 @@  discard block
 block discarded – undo
16 16
      */
17 17
     protected function getEventFromTypeDeclaration(\ReflectionMethod $method): array
18 18
     {
19
-        if ($method->getNumberOfParameters() > 1) {
19
+        if ($method->getNumberOfParameters() > 1)
20
+        {
20 21
             throw $this->badClassMethod($method->class, $method->getName());
21 22
         }
22 23
         $type = $method->getParameters()[0]->getType();
@@ -29,8 +30,10 @@  discard block
 block discarded – undo
29 30
         };
30 31
 
31 32
         $result = [];
32
-        foreach ($eventTypes as $type) {
33
-            if ($type->isBuiltin()) {
33
+        foreach ($eventTypes as $type)
34
+        {
35
+            if ($type->isBuiltin())
36
+            {
34 37
                 continue;
35 38
             }
36 39
             $result[] = $type->getName();
@@ -44,9 +47,12 @@  discard block
 block discarded – undo
44 47
      */
45 48
     protected function getMethod(string $class, string $name): \ReflectionMethod
46 49
     {
47
-        try {
50
+        try
51
+        {
48 52
             return new \ReflectionMethod($class, $name);
49
-        } catch (\ReflectionException) {
53
+        }
54
+        catch (\ReflectionException)
55
+        {
50 56
             throw $this->badClassMethod($class, $name);
51 57
         }
52 58
     }
Please login to merge, or discard this patch.
src/Events/src/ListenerProcessorRegistry.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
 
21 21
     public function process(): void
22 22
     {
23
-        if ($this->processed) {
23
+        if ($this->processed){
24 24
             return;
25 25
         }
26 26
 
27
-        foreach ($this->processors as $processor) {
27
+        foreach ($this->processors as $processor){
28 28
             $processor->process();
29 29
         }
30 30
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,13 @@
 block discarded – undo
20 20
 
21 21
     public function process(): void
22 22
     {
23
-        if ($this->processed) {
23
+        if ($this->processed)
24
+        {
24 25
             return;
25 26
         }
26 27
 
27
-        foreach ($this->processors as $processor) {
28
+        foreach ($this->processors as $processor)
29
+        {
28 30
             $processor->process();
29 31
         }
30 32
 
Please login to merge, or discard this patch.
src/Events/src/ListenerFactoryInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,5 +11,5 @@
 block discarded – undo
11 11
      * @return \Closure(object $event): void
12 12
      * @throws \BadMethodCallException
13 13
      */
14
-    public function create(string|object $listener, string $method): \Closure;
14
+    public function create(string | object $listener, string $method): \Closure;
15 15
 }
Please login to merge, or discard this patch.