Completed
Push — master ( 4bf010...802657 )
by Kirill
07:20 queued 03:36
created
src/Compiler/Builder/Invocation/DirectiveBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
         $directive = new DirectiveInvocation($parent->getDocument(), $rule->getDirectiveName());
34 34
         $directive->withOffset($rule->getOffset());
35 35
 
36
-        $this->when->resolving(function () use ($rule, $directive): void {
36
+        $this->when->resolving(function() use ($rule, $directive): void {
37 37
             /** @var DirectiveDefinition $definition */
38 38
             $definition = $directive->getDefinition();
39 39
 
40
-            if (! ($definition instanceof Definition\DirectiveDefinition)) {
40
+            if (!($definition instanceof Definition\DirectiveDefinition)) {
41 41
                 $error = '%s should be a Directive, but %s given';
42 42
                 throw (new TypeConflictException(\sprintf($error, $directive, $definition)))
43 43
                     ->throwsIn($directive->getFile(), $rule->getOffset());
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             foreach ($rule->getDirectiveArguments() as $ast) {
48 48
                 $name = $ast->getArgumentName();
49 49
 
50
-                if (! $definition->hasArgument($name)) {
50
+                if (!$definition->hasArgument($name)) {
51 51
                     $error = 'Directive %s does not provide argument %s';
52 52
                     throw (new TypeConflictException(\sprintf($error, $definition, $name)))
53 53
                         ->throwsIn($directive->getFile(), $ast->getOffset());
Please login to merge, or discard this patch.
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/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.