Test Failed
Push — master ( 08713d...9fa0b4 )
by Kirill
03:13
created
src/Compiler/Builder/Definition/ObjectBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@
 block discarded – undo
37 37
             $object->withField($this->dependent($ast, $object));
38 38
         }
39 39
 
40
-        $this->when->resolving(function () use ($rule, $object): void {
40
+        $this->when->resolving(function() use ($rule, $object): void {
41 41
             foreach ($rule->getImplementations() as $interface) {
42 42
                 $object->withInterface($interface->getTypeName());
43 43
             }
44 44
         });
45 45
 
46
-        $this->when->runtime(function () use ($rule, $object): void {
46
+        $this->when->runtime(function() use ($rule, $object): void {
47 47
             foreach ($rule->getDirectives() as $ast) {
48 48
                 $object->withDirective($this->dependent($ast, $object));
49 49
             }
Please login to merge, or discard this patch.
src/Compiler/Builder/Definition/EnumBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
             $enum->withValue($this->dependent($enumValue, $enum));
37 37
         }
38 38
 
39
-        $this->when->runtime(function () use ($rule, $enum): void {
39
+        $this->when->runtime(function() use ($rule, $enum): void {
40 40
             foreach ($rule->getDirectives() as $ast) {
41 41
                 $enum->withDirective($this->dependent($ast, $enum));
42 42
             }
Please login to merge, or discard this patch.
src/Compiler/Builder/Definition/UnionBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
         $union->withOffset($rule->getOffset());
34 34
         $union->withDescription($rule->getDescription());
35 35
 
36
-        $this->when->resolving(function () use ($rule, $union): void {
36
+        $this->when->resolving(function() use ($rule, $union): void {
37 37
             foreach ($rule->getUnitedTypes() as $ast) {
38 38
                 $union->withDefinition($ast->getTypeName());
39 39
             }
40 40
         });
41 41
 
42
-        $this->when->runtime(function () use ($rule, $union): void {
42
+        $this->when->runtime(function() use ($rule, $union): void {
43 43
             foreach ($rule->getDirectives() as $ast) {
44 44
                 $union->withDirective($this->dependent($ast, $union));
45 45
             }
Please login to merge, or discard this patch.
src/Compiler/Builder/Definition/InputBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         $input->withOffset($rule->getOffset());
33 33
         $input->withDescription($rule->getDescription());
34 34
 
35
-        $this->when->runtime(function () use ($rule, $input): void {
35
+        $this->when->runtime(function() use ($rule, $input): void {
36 36
             foreach ($rule->getDirectives() as $ast) {
37 37
                 $input->withDirective($this->dependent($ast, $input));
38 38
             }
Please login to merge, or discard this patch.
src/Compiler/Builder/Definition/ScalarBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
         $scalar->withOffset($rule->getOffset());
33 33
         $scalar->withDescription($rule->getDescription());
34 34
 
35
-        $this->when->resolving(function () use ($rule, $scalar): void {
35
+        $this->when->resolving(function() use ($rule, $scalar): void {
36 36
             if ($ast = $rule->getExtends()) {
37 37
                 $parent = $this->load($ast->getTypeName(), $scalar);
38 38
 
39
-                if (! ($parent instanceof Definition\ScalarDefinition)) {
39
+                if (!($parent instanceof Definition\ScalarDefinition)) {
40 40
                     $error = '%s can extends only Scalar type, but %s given';
41 41
                     throw (new TypeConflictException(\sprintf($error, $scalar, $parent)))
42 42
                         ->throwsIn($scalar->getFile(), $rule->getOffset());
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             }
47 47
         });
48 48
 
49
-        $this->when->runtime(function () use ($rule, $scalar): void {
49
+        $this->when->runtime(function() use ($rule, $scalar): void {
50 50
             foreach ($rule->getDirectives() as $ast) {
51 51
                 $scalar->withDirective($this->dependent($ast, $scalar));
52 52
             }
Please login to merge, or discard this patch.
src/Compiler/Builder/Definition/SchemaBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $schema->withOffset($rule->getOffset());
51 51
         $schema->withDescription($rule->getDescription());
52 52
 
53
-        $this->when->runtime(function () use ($rule, $schema): void {
53
+        $this->when->runtime(function() use ($rule, $schema): void {
54 54
             foreach ($rule->getDirectives() as $ast) {
55 55
                 $schema->withDirective($this->dependent($ast, $schema));
56 56
             }
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
             $this->validateModifiers($name, $hint, $schema);
76 76
             $this->validateFieldName($name, $ast, $schema);
77 77
 
78
-            $this->when->resolving(function () use ($name, $schema, $hint): void {
78
+            $this->when->resolving(function() use ($name, $schema, $hint): void {
79 79
                 $type = $this->load($hint->getTypeName(), $schema);
80 80
 
81
-                if (! ($type instanceof Definition\ObjectDefinition)) {
81
+                if (!($type instanceof Definition\ObjectDefinition)) {
82 82
                     $error = 'Schema field %s<SchemaField> should return Object type, but %s given';
83 83
                     throw (new TypeConflictException(\sprintf($error, $name, $type)))
84 84
                         ->throwsIn($schema->getFile(), $hint->getOffset());
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     private function validateFieldName(string $field, SchemaFieldDefinitionNode $rule, SchemaDefinition $schema): void
126 126
     {
127
-        if (! \in_array($field, [self::FIELD_QUERY, self::FIELD_MUTATION, self::FIELD_SUBSCRIPTION], true)) {
127
+        if (!\in_array($field, [self::FIELD_QUERY, self::FIELD_MUTATION, self::FIELD_SUBSCRIPTION], true)) {
128 128
             $error = \sprintf('Invalid %s schema field name "%s"', $schema, $field);
129 129
 
130 130
             throw (new TypeConflictException($error))->throwsIn($schema->getFile(), $rule->getOffset());
Please login to merge, or discard this patch.
src/Compiler/Builder/Definition/InterfaceBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@
 block discarded – undo
37 37
             $interface->withField($this->dependent($ast, $interface));
38 38
         }
39 39
 
40
-        $this->when->runtime(function () use ($rule, $interface): void {
40
+        $this->when->runtime(function() use ($rule, $interface): void {
41 41
             foreach ($rule->getDirectives() as $ast) {
42 42
                 $interface->withDirective($this->dependent($ast, $interface));
43 43
             }
44 44
         });
45 45
 
46
-        $this->when->resolving(function () use ($rule, $interface): void {
46
+        $this->when->resolving(function() use ($rule, $interface): void {
47 47
             foreach ($rule->getImplementations() as $child) {
48 48
                 $interface->withInterface($child->getTypeName());
49 49
             }
Please login to merge, or discard this patch.
src/Compiler/Builder/Common/ValueInvocation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $stack = clone $this->stack;
78 78
 
79 79
         foreach ($stack as $i) {
80
-            if ((string)$i === (string)$definition) {
80
+            if ((string) $i === (string) $definition) {
81 81
                 return true;
82 82
             }
83 83
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         foreach ($definition->getFields() as $field) {
116 116
             $argument = $input->getArgument($field->getName());
117 117
 
118
-            if ($argument === null && $field->isNonNull() && ! $field->hasDefaultValue()) {
118
+            if ($argument === null && $field->isNonNull() && !$field->hasDefaultValue()) {
119 119
                 $error = \sprintf('Missing value for required argument %s', $field);
120 120
                 throw (new TypeConflictException($error))->throwsIn($input->getFile(), $input->getLine(),
121 121
                         $input->getColumn());
Please login to merge, or discard this patch.
src/Compiler/Builder/Common/ValueTypeResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     private function getFilter(): \Closure
123 123
     {
124
-        return function (TypeDefinition $resolved): bool {
124
+        return function(TypeDefinition $resolved): bool {
125 125
             return $this->shouldBreak($resolved);
126 126
         };
127 127
     }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     private function shouldBreak(TypeDefinition $resolved): bool
134 134
     {
135
-        return ! isset($this->breakpoints[$resolved->getName()]);
135
+        return !isset($this->breakpoints[$resolved->getName()]);
136 136
     }
137 137
 
138 138
     /**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         yield $type;
146 146
 
147 147
         foreach ($type->inheritedBy() as $child) {
148
-            if (! $filter($child)) {
148
+            if (!$filter($child)) {
149 149
                 continue;
150 150
             }
151 151
 
Please login to merge, or discard this patch.