Passed
Pull Request — master (#9)
by Max
03:51
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
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 
38 38
         parent::__construct([
39 39
             'type' => $lazy ? function() use($name, $config, $args) {
40
-				return static::_create($name, $args, $config);
41
-			} : static::_create($name, $args, $config),
40
+                return static::_create($name, $args, $config);
41
+            } : static::_create($name, $args, $config),
42 42
             'args' => $args,
43 43
             'name' => $name,
44 44
             'resolve' => function ($value, $args1, $context, $info) use ($config, $args) {
@@ -63,33 +63,33 @@  discard block
 block discarded – undo
63 63
     }
64 64
 
65 65
     protected function _create($name, $args, $config) {
66
-		return UserErrorsType::create([
67
-			'errorCodes' => $config['errorCodes'] ?? null,
68
-			'isRoot' => true,
69
-			'fields' => [
70
-				$this->resultFieldName => [
71
-					'type' => $config['type'],
72
-					'description' => 'The payload, if any',
73
-					'resolve' => static function ($value) {
74
-						return $value['result'] ?? null;
75
-					},
76
-				],
77
-				$this->validFieldName => [
78
-					'type' => Type::nonNull(Type::boolean()),
79
-					'description' => 'Whether all validation passed. True for yes, false for no.',
80
-					'resolve' => static function ($value) {
81
-						return $value['valid'];
82
-					},
83
-				],
84
-			],
85
-			'validate' => $config['validate'] ?? null,
86
-			'type' => new InputObjectType([
87
-				'fields' => $args,
88
-				'name' => '',
89
-			]),
90
-			'typeSetter' => $config['typeSetter'] ?? null,
91
-		], [$name], false, ucfirst($name) . 'Result');
92
-	}
66
+        return UserErrorsType::create([
67
+            'errorCodes' => $config['errorCodes'] ?? null,
68
+            'isRoot' => true,
69
+            'fields' => [
70
+                $this->resultFieldName => [
71
+                    'type' => $config['type'],
72
+                    'description' => 'The payload, if any',
73
+                    'resolve' => static function ($value) {
74
+                        return $value['result'] ?? null;
75
+                    },
76
+                ],
77
+                $this->validFieldName => [
78
+                    'type' => Type::nonNull(Type::boolean()),
79
+                    'description' => 'Whether all validation passed. True for yes, false for no.',
80
+                    'resolve' => static function ($value) {
81
+                        return $value['valid'];
82
+                    },
83
+                ],
84
+            ],
85
+            'validate' => $config['validate'] ?? null,
86
+            'type' => new InputObjectType([
87
+                'fields' => $args,
88
+                'name' => '',
89
+            ]),
90
+            'typeSetter' => $config['typeSetter'] ?? null,
91
+        ], [$name], false, ucfirst($name) . 'Result');
92
+    }
93 93
 
94 94
     private function _noop($value) {
95 95
         // 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.