Completed
Push — master ( 4bf010...802657 )
by Kirill
07:20 queued 03:36
created
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/InputUnionBuilder.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
         $inputUnion->withOffset($rule->getOffset());
34 34
         $inputUnion->withDescription($rule->getDescription());
35 35
 
36
-        $this->when->runtime(function () use ($rule, $inputUnion): void {
36
+        $this->when->runtime(function() use ($rule, $inputUnion): void {
37 37
             foreach ($rule->getDirectives() as $ast) {
38 38
                 $inputUnion->withDirective($this->dependent($ast, $inputUnion));
39 39
             }
40 40
         });
41 41
 
42
-        $this->when->resolving(function () use ($rule, $inputUnion): void {
42
+        $this->when->resolving(function() use ($rule, $inputUnion): void {
43 43
             foreach ($rule->getUnitedTypes() as $ast) {
44 44
                 $inputUnion->withDefinition($ast->getTypeName());
45 45
             }
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/Dependent/EnumValueBuilder.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         $value->withOffset($rule->getOffset());
37 37
         $value->withDescription($rule->getDescription());
38 38
 
39
-        $this->when->runtime(function () use ($rule, $value): void {
39
+        $this->when->runtime(function() use ($rule, $value): void {
40 40
             if ($hint = $rule->getTypeHint()) {
41 41
                 $value->withValue($this->valueOf($this->virtualTypeHint($value, $hint), $rule->getValue()));
42 42
             }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,8 @@
 block discarded – undo
56 56
      */
57 57
     private function virtualTypeHint(EnumValueDefinition $value, TypeHintNode $ast): TypeHint
58 58
     {
59
-        $virtual = new class($value->getDocument()) extends TypeHint {
59
+        $virtual = new class($value->getDocument()) extends TypeHint
60
+        {
60 61
             public static function getType(): TypeInterface
61 62
             {
62 63
                 return Type::of(Type::ENUM_VALUE);
Please login to merge, or discard this patch.
src/Compiler/Builder/Dependent/ArgumentBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         $argument->withDescription($rule->getDescription());
35 35
         $argument->withModifiers($hint->getModifiers());
36 36
 
37
-        $this->when->runtime(function () use ($rule, $argument): void {
37
+        $this->when->runtime(function() use ($rule, $argument): void {
38 38
             if ($default = $rule->getDefaultValue()) {
39 39
                 $argument->withDefaultValue($this->valueOf($argument, $default));
40 40
             }
Please login to merge, or discard this patch.
src/Compiler/Builder/Dependent/InputFieldBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         $field->withDescription($rule->getDescription());
35 35
         $field->withModifiers($hint->getModifiers());
36 36
 
37
-        $this->when->runtime(function () use ($rule, $field): void {
37
+        $this->when->runtime(function() use ($rule, $field): void {
38 38
             if ($default = $rule->getDefaultValue()) {
39 39
                 $field->withDefaultValue($this->valueOf($field, $default));
40 40
             }
Please login to merge, or discard this patch.
src/Compiler/Builder/Dependent/FieldBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             $field->withArgument($this->dependent($ast, $field));
40 40
         }
41 41
 
42
-        $this->when->runtime(function () use ($rule, $field): void {
42
+        $this->when->runtime(function() use ($rule, $field): void {
43 43
             foreach ($rule->getDirectives() as $ast) {
44 44
                 $field->withDirective($this->dependent($ast, $field));
45 45
             }
Please login to merge, or discard this patch.