Failed Conditions
Pull Request — master (#10)
by Max
02:35
created
src/Type/Definition/UserErrorsType.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@
 block discarded – undo
54 54
     protected function _getType($config) {
55 55
         $type = $config['type'];
56 56
         if (is_callable($type)) {
57
-        	$type = $type();
58
-		}
57
+            $type = $type();
58
+        }
59 59
 
60 60
         if ($type instanceof WrappingType) {
61 61
             $type = $type->getWrappedType(true);
Please login to merge, or discard this patch.
src/Type/Definition/ValidatedFieldDefinition.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
         parent::__construct([
38 38
             'type' => function() use($name, $config, $args) {
39
-				return static::_create($name, $args, $config);
40
-			},
39
+                return static::_create($name, $args, $config);
40
+            },
41 41
             'args' => $args,
42 42
             'name' => $name,
43 43
             'resolve' => function ($value, $args1, $context, $info) use ($config, $args) {
@@ -62,33 +62,33 @@  discard block
 block discarded – undo
62 62
     }
63 63
 
64 64
     protected function _create($name, $args, $config) {
65
-		return UserErrorsType::create([
66
-			'errorCodes' => $config['errorCodes'] ?? null,
67
-			'isRoot' => true,
68
-			'fields' => [
69
-				$this->resultFieldName => [
70
-					'type' => $config['type'],
71
-					'description' => 'The payload, if any',
72
-					'resolve' => static function ($value) {
73
-						return $value['result'] ?? null;
74
-					},
75
-				],
76
-				$this->validFieldName => [
77
-					'type' => Type::nonNull(Type::boolean()),
78
-					'description' => 'Whether all validation passed. True for yes, false for no.',
79
-					'resolve' => static function ($value) {
80
-						return $value['valid'];
81
-					},
82
-				],
83
-			],
84
-			'validate' => $config['validate'] ?? null,
85
-			'type' => new InputObjectType([
86
-				'fields' => $args,
87
-				'name' => '',
88
-			]),
89
-			'typeSetter' => $config['typeSetter'] ?? null,
90
-		], [$name], false, ucfirst($name) . 'Result');
91
-	}
65
+        return UserErrorsType::create([
66
+            'errorCodes' => $config['errorCodes'] ?? null,
67
+            'isRoot' => true,
68
+            'fields' => [
69
+                $this->resultFieldName => [
70
+                    'type' => $config['type'],
71
+                    'description' => 'The payload, if any',
72
+                    'resolve' => static function ($value) {
73
+                        return $value['result'] ?? null;
74
+                    },
75
+                ],
76
+                $this->validFieldName => [
77
+                    'type' => Type::nonNull(Type::boolean()),
78
+                    'description' => 'Whether all validation passed. True for yes, false for no.',
79
+                    'resolve' => static function ($value) {
80
+                        return $value['valid'];
81
+                    },
82
+                ],
83
+            ],
84
+            'validate' => $config['validate'] ?? null,
85
+            'type' => new InputObjectType([
86
+                'fields' => $args,
87
+                'name' => '',
88
+            ]),
89
+            'typeSetter' => $config['typeSetter'] ?? null,
90
+        ], [$name], false, ucfirst($name) . 'Result');
91
+    }
92 92
 
93 93
     private function _noop($value) {
94 94
         // this is just a no-op validation function to fallback to when no validation function is provided
Please login to merge, or discard this patch.