Test Failed
Pull Request — master (#961)
by Maxim
09:59
created
src/Filters/src/Model/Mapper/Mapper.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     public function __construct(
17 17
         private readonly SchemaProviderInterface $schemaProvider,
18 18
         private readonly SetterRegistryInterface $registry
19
-    ) {
19
+    ){
20 20
     }
21 21
 
22 22
     /**
@@ -26,30 +26,30 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $class = new \ReflectionClass($filter);
28 28
 
29
-        foreach ($this->schemaProvider->getSchema($filter) as $field => $map) {
30
-            if (!empty($map[Builder::SCHEMA_FILTER]) && $data[$field] === []) {
29
+        foreach ($this->schemaProvider->getSchema($filter) as $field => $map){
30
+            if (!empty($map[Builder::SCHEMA_FILTER]) && $data[$field] === []){
31 31
                 continue;
32 32
             }
33 33
 
34 34
             $property = $class->getProperty($field);
35
-            foreach ($this->registry->getSetters() as $setter) {
36
-                if (!empty($map[Builder::SCHEMA_FILTER])) {
35
+            foreach ($this->registry->getSetters() as $setter){
36
+                if (!empty($map[Builder::SCHEMA_FILTER])){
37 37
                     $this->registry->getDefault()->setValue($filter, $property, $data[$field]);
38 38
                     break;
39 39
                 }
40 40
 
41 41
                 $type = $property->getType();
42
-                if (!isset($data[$field]) && $type->allowsNull()) {
42
+                if (!isset($data[$field]) && $type->allowsNull()){
43 43
                     $this->registry->getDefault()->setValue($filter, $property, null);
44 44
                     break;
45 45
                 }
46 46
 
47
-                if (!$type instanceof \ReflectionNamedType || $type->isBuiltin()) {
47
+                if (!$type instanceof \ReflectionNamedType || $type->isBuiltin()){
48 48
                     $this->registry->getDefault()->setValue($filter, $property, $data[$field]);
49 49
                     break;
50 50
                 }
51 51
 
52
-                if ($setter->supports($type)) {
52
+                if ($setter->supports($type)){
53 53
                     $setter->setValue($filter, $property, $data[$field]);
54 54
                 }
55 55
             }
Please login to merge, or discard this patch.
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,30 +26,37 @@
 block discarded – undo
26 26
     {
27 27
         $class = new \ReflectionClass($filter);
28 28
 
29
-        foreach ($this->schemaProvider->getSchema($filter) as $field => $map) {
30
-            if (!empty($map[Builder::SCHEMA_FILTER]) && $data[$field] === []) {
29
+        foreach ($this->schemaProvider->getSchema($filter) as $field => $map)
30
+        {
31
+            if (!empty($map[Builder::SCHEMA_FILTER]) && $data[$field] === [])
32
+            {
31 33
                 continue;
32 34
             }
33 35
 
34 36
             $property = $class->getProperty($field);
35
-            foreach ($this->registry->getSetters() as $setter) {
36
-                if (!empty($map[Builder::SCHEMA_FILTER])) {
37
+            foreach ($this->registry->getSetters() as $setter)
38
+            {
39
+                if (!empty($map[Builder::SCHEMA_FILTER]))
40
+                {
37 41
                     $this->registry->getDefault()->setValue($filter, $property, $data[$field]);
38 42
                     break;
39 43
                 }
40 44
 
41 45
                 $type = $property->getType();
42
-                if (!isset($data[$field]) && $type->allowsNull()) {
46
+                if (!isset($data[$field]) && $type->allowsNull())
47
+                {
43 48
                     $this->registry->getDefault()->setValue($filter, $property, null);
44 49
                     break;
45 50
                 }
46 51
 
47
-                if (!$type instanceof \ReflectionNamedType || $type->isBuiltin()) {
52
+                if (!$type instanceof \ReflectionNamedType || $type->isBuiltin())
53
+                {
48 54
                     $this->registry->getDefault()->setValue($filter, $property, $data[$field]);
49 55
                     break;
50 56
                 }
51 57
 
52
-                if ($setter->supports($type)) {
58
+                if ($setter->supports($type))
59
+                {
53 60
                     $setter->setValue($filter, $property, $data[$field]);
54 61
                 }
55 62
             }
Please login to merge, or discard this patch.
src/Filters/src/Model/Mapper/Uuid.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
     public function supports(\ReflectionNamedType $type): bool
15 15
     {
16
-        if ($this->interfaceExists === null) {
16
+        if ($this->interfaceExists === null){
17 17
             $this->interfaceExists = \interface_exists(UuidInterface::class);
18 18
         }
19 19
 
@@ -27,16 +27,16 @@  discard block
 block discarded – undo
27 27
 
28 28
     private function implements(string $haystack, string $interface): bool
29 29
     {
30
-        if ($haystack === $interface) {
30
+        if ($haystack === $interface){
31 31
             return true;
32 32
         }
33 33
 
34
-        foreach ((array)\class_implements($haystack) as $implements) {
35
-            if ($implements === $interface) {
34
+        foreach ((array)\class_implements($haystack) as $implements){
35
+            if ($implements === $interface){
36 36
                 return true;
37 37
             }
38 38
 
39
-            if (self::implements($implements, $interface)) {
39
+            if (self::implements($implements, $interface)){
40 40
                 return true;
41 41
             }
42 42
         }
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,8 @@  discard block
 block discarded – undo
13 13
 
14 14
     public function supports(\ReflectionNamedType $type): bool
15 15
     {
16
-        if ($this->interfaceExists === null) {
16
+        if ($this->interfaceExists === null)
17
+        {
17 18
             $this->interfaceExists = \interface_exists(UuidInterface::class);
18 19
         }
19 20
 
@@ -27,16 +28,20 @@  discard block
 block discarded – undo
27 28
 
28 29
     private function implements(string $haystack, string $interface): bool
29 30
     {
30
-        if ($haystack === $interface) {
31
+        if ($haystack === $interface)
32
+        {
31 33
             return true;
32 34
         }
33 35
 
34
-        foreach ((array)\class_implements($haystack) as $implements) {
35
-            if ($implements === $interface) {
36
+        foreach ((array)\class_implements($haystack) as $implements)
37
+        {
38
+            if ($implements === $interface)
39
+            {
36 40
                 return true;
37 41
             }
38 42
 
39
-            if (self::implements($implements, $interface)) {
43
+            if (self::implements($implements, $interface))
44
+            {
40 45
                 return true;
41 46
             }
42 47
         }
Please login to merge, or discard this patch.
src/Filters/src/Model/FilterProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         private readonly CoreInterface $validationCore,
26 26
         private readonly FilterFactory $filterFactory,
27 27
         private readonly SchemaProviderInterface $schemaProvider
28
-    ) {
28
+    ){
29 29
     }
30 30
 
31 31
     public function createFilter(string $name, InputInterface $input): FilterInterface
Please login to merge, or discard this patch.
src/Filters/src/Model/Factory/FilterFactory.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 {
15 15
     public function __construct(
16 16
         private readonly ResolverInterface $resolver,
17
-    ) {
17
+    ){
18 18
     }
19 19
 
20 20
     public function createFilterInstance(string $name): FilterInterface
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         $class = new \ReflectionClass($name);
23 23
 
24 24
         $args = [];
25
-        if ($constructor = $class->getConstructor()) {
25
+        if ($constructor = $class->getConstructor()){
26 26
             $args = $this->resolver->resolveArguments($constructor);
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
         $class = new \ReflectionClass($name);
23 23
 
24 24
         $args = [];
25
-        if ($constructor = $class->getConstructor()) {
25
+        if ($constructor = $class->getConstructor())
26
+        {
26 27
             $args = $this->resolver->resolveArguments($constructor);
27 28
         }
28 29
 
Please login to merge, or discard this patch.
src/Framework/Bootloader/Security/FiltersBootloader.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         private readonly ContainerInterface $container,
53 53
         private readonly BinderInterface $binder,
54 54
         private readonly ConfiguratorInterface $config
55
-    ) {
55
+    ){
56 56
     }
57 57
 
58 58
     /**
@@ -106,12 +106,12 @@  discard block
 block discarded – undo
106 106
         ?EventDispatcherInterface $dispatcher = null
107 107
     ): FilterProvider {
108 108
         $core = new InterceptableCore(new Core(), $dispatcher);
109
-        foreach ($config->getInterceptors() as $interceptor) {
109
+        foreach ($config->getInterceptors() as $interceptor){
110 110
             $core->addInterceptor($container->get($interceptor));
111 111
         }
112 112
 
113 113
         $validationCode = new InterceptableCore(new ValidationCore($container), $dispatcher);
114
-        foreach ($config->getValidationInterceptors() as $interceptor) {
114
+        foreach ($config->getValidationInterceptors() as $interceptor){
115 115
             $validationCode->addInterceptor($container->get($interceptor));
116 116
         }
117 117
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,12 +106,14 @@
 block discarded – undo
106 106
         ?EventDispatcherInterface $dispatcher = null
107 107
     ): FilterProvider {
108 108
         $core = new InterceptableCore(new Core(), $dispatcher);
109
-        foreach ($config->getInterceptors() as $interceptor) {
109
+        foreach ($config->getInterceptors() as $interceptor)
110
+        {
110 111
             $core->addInterceptor($container->get($interceptor));
111 112
         }
112 113
 
113 114
         $validationCode = new InterceptableCore(new ValidationCore($container), $dispatcher);
114
-        foreach ($config->getValidationInterceptors() as $interceptor) {
115
+        foreach ($config->getValidationInterceptors() as $interceptor)
116
+        {
115 117
             $validationCode->addInterceptor($container->get($interceptor));
116 118
         }
117 119
 
Please login to merge, or discard this patch.