Passed
Pull Request — master (#7)
by Max
05:23
created
src/Type/Definition/ValidatedFieldDefinition.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             'name' => $name,
65 65
             'resolve' => function ($value, $args1, $context, $info) use ($config, $args) {
66 66
                 // validate inputs
67
-                $config['type']  = new InputObjectType([
67
+                $config['type'] = new InputObjectType([
68 68
                     'name'=>'',
69 69
                     'fields' => $args,
70 70
                 ]);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         if ($arr === []) {
90 90
             return false;
91 91
         }
92
-        return array_keys($arr) !== range(0, count($arr) - 1);
92
+        return array_keys($arr) !== range(0, count($arr)-1);
93 93
     }
94 94
 
95 95
     /**
@@ -107,10 +107,10 @@  discard block
 block discarded – undo
107 107
                 $newPath[]            = 0;
108 108
                 $this->_validateItems($config, $subValue, $newPath, $validate);
109 109
             } else {
110
-                $path[count($path) - 1] = $idx;
110
+                $path[count($path)-1] = $idx;
111 111
                 $err                    = $validate($subValue);
112 112
 
113
-                if(empty($err)) {
113
+                if (empty($err)) {
114 114
                     $wrappedType = $config['type']->getWrappedType(true);
115 115
                     $err = $this->_validate([
116 116
                         'type' => $wrappedType
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         $fields = $type->getFields();
190 190
         if (is_array($value)) {
191 191
             foreach ($value as $key => $subValue) {
192
-                $config                 = $fields[$key]->config;
192
+                $config = $fields[$key]->config;
193 193
                 $res['errors'][$key] = $this->_validate($config, $subValue);
194 194
             }
195 195
             $res['errors'] = array_filter($res['errors'] ?? []);
Please login to merge, or discard this patch.