@@ -29,11 +29,11 @@ |
||
29 | 29 | { |
30 | 30 | if ($ast instanceof ProvidesArgumentNodes) { |
31 | 31 | foreach ($ast->getArgumentNodes() as $child) { |
32 | - $this->deferred(function () use ($definition, $child) { |
|
32 | + $this->deferred(function() use ($definition, $child) { |
|
33 | 33 | /** @var Definition\Dependent\ArgumentDefinition $argument */ |
34 | 34 | $argument = $this->process->build($child, $definition); |
35 | 35 | |
36 | - $this->linker(function () use ($definition, $argument) { |
|
36 | + $this->linker(function() use ($definition, $argument) { |
|
37 | 37 | if ($definition->hasArgument($argument->getName())) { |
38 | 38 | throw $this->redeclareException($argument); |
39 | 39 | } |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | { |
33 | 33 | if ($definition instanceof ProvidesDirectives && $ast instanceof ProvidesDirectiveNodes) { |
34 | 34 | foreach ($ast->getDirectiveNodes() as $child) { |
35 | - $this->deferred(function () use ($definition, $child) { |
|
35 | + $this->deferred(function() use ($definition, $child) { |
|
36 | 36 | /** @var DirectiveInvocation $directive */ |
37 | 37 | $directive = $this->process->build($child, $definition); |
38 | 38 | |
39 | - $this->linker(function () use ($definition, $directive) { |
|
39 | + $this->linker(function() use ($definition, $directive) { |
|
40 | 40 | $this->validateDefinition($directive); |
41 | 41 | |
42 | 42 | $definition->withDirective($directive); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | $definition = $directive->getDefinition(); |
56 | 56 | |
57 | - if (! $definition instanceof DirectiveDefinition) { |
|
57 | + if (!$definition instanceof DirectiveDefinition) { |
|
58 | 58 | $error = \sprintf('Can not use %s as directive', $definition); |
59 | 59 | throw (new TypeConflictException($error))->in($directive); |
60 | 60 | } |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | { |
31 | 31 | if ($document instanceof Document) { |
32 | 32 | foreach ($ast as $child) { |
33 | - $this->deferred(function () use ($document, $child) { |
|
33 | + $this->deferred(function() use ($document, $child) { |
|
34 | 34 | $definition = $this->process->build($child, $document); |
35 | 35 | |
36 | 36 | if ($definition instanceof TypeDefinition) { |
37 | - $this->deferred(function () use ($definition, $document) { |
|
37 | + $this->deferred(function() use ($definition, $document) { |
|
38 | 38 | if ($document->getDictionary()->has($definition->getName())) { |
39 | 39 | throw $this->redeclareException($definition); |
40 | 40 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | |
47 | 47 | if ($definition instanceof DirectiveInvocation) { |
48 | - $this->complete(function () use ($definition, $document) { |
|
48 | + $this->complete(function() use ($definition, $document) { |
|
49 | 49 | $document->withDirective($definition); |
50 | 50 | }); |
51 | 51 | } |
@@ -29,11 +29,11 @@ |
||
29 | 29 | { |
30 | 30 | if ($ast instanceof ProvidesFieldNodes) { |
31 | 31 | foreach ($ast->getFieldNodes() as $child) { |
32 | - $this->deferred(function () use ($definition, $child) { |
|
32 | + $this->deferred(function() use ($definition, $child) { |
|
33 | 33 | /** @var Definition\Dependent\FieldDefinition $field */ |
34 | 34 | $field = $this->process->build($child, $definition); |
35 | 35 | |
36 | - $this->linker(function () use ($definition, $field) { |
|
36 | + $this->linker(function() use ($definition, $field) { |
|
37 | 37 | if ($definition->hasField($field->getName())) { |
38 | 38 | throw $this->redeclareException($field); |
39 | 39 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | $definition->withModifiers($hint->getModifiers()); |
57 | 57 | |
58 | - $this->linker(function () use ($hint, $definition) { |
|
58 | + $this->linker(function() use ($hint, $definition) { |
|
59 | 59 | /** @var TypeDefinition $resolved */ |
60 | 60 | $resolved = $this->get($hint->getFullName(), $definition); |
61 | 61 | |
@@ -76,10 +76,10 @@ discard block |
||
76 | 76 | $error = null; |
77 | 77 | |
78 | 78 | switch ($behaviour) { |
79 | - case self::IS_RENDERABLE && ! $hint->isRenderable(): |
|
79 | + case self::IS_RENDERABLE && !$hint->isRenderable(): |
|
80 | 80 | $error = '%s "%s" can contain only renderable type (unions, objects, etc), but %s given'; |
81 | 81 | break; |
82 | - case self::IS_INPUTABLE && ! $hint->isInputable(): |
|
82 | + case self::IS_INPUTABLE && !$hint->isInputable(): |
|
83 | 83 | $error = '%s "%s" can contain only inputable type (inputs, scalars, etc), but %s given'; |
84 | 84 | break; |
85 | 85 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | }); |
41 | 41 | |
42 | 42 | if ($parent instanceof ObjectDefinition) { |
43 | - $this->inference(function () use ($parent) { |
|
43 | + $this->inference(function() use ($parent) { |
|
44 | 44 | foreach ($parent->getInterfaces() as $interface) { |
45 | 45 | $this->verifyFieldsInheritance($parent, $interface); |
46 | 46 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | private function verifyIsInterface(Definition $parent, TypeDefinition $definition): void |
90 | 90 | { |
91 | - if (! $definition instanceof InterfaceDefinition) { |
|
91 | + if (!$definition instanceof InterfaceDefinition) { |
|
92 | 92 | $error = '%s can implement only interfaces, but %s given'; |
93 | 93 | throw new TypeConflictException(\sprintf($error, $parent, $definition)); |
94 | 94 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | private function verifySelfReferenceImplementation(ProvidesInterfaces $parent, TypeDefinition $interface): void |
117 | 117 | { |
118 | 118 | if ($parent->isImplements($parent)) { |
119 | - $error = 'Can not implement the interface %s by %s, ' . |
|
119 | + $error = 'Can not implement the interface %s by %s, '. |
|
120 | 120 | 'because it contains a reference to the already implemented type %s'; |
121 | 121 | $error = \sprintf($error, $interface, $parent, $parent); |
122 | 122 |
@@ -99,7 +99,7 @@ |
||
99 | 99 | */ |
100 | 100 | private function buildDefinition(RuleInterface $rule, DefinitionInterface $parent): DefinitionInterface |
101 | 101 | { |
102 | - if (! $rule instanceof ProvidesDefinition) { |
|
102 | + if (!$rule instanceof ProvidesDefinition) { |
|
103 | 103 | $error = \vsprintf('%s AST should implement %s interface', [ |
104 | 104 | $rule->getName(), ProvidesDefinition::class]); |
105 | 105 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | private function addLoggerListener(): void |
46 | 46 | { |
47 | - parent::onTypeNotFound(function (string $type, ?Definition $from): void { |
|
47 | + parent::onTypeNotFound(function(string $type, ?Definition $from): void { |
|
48 | 48 | if ($this->logger) { |
49 | 49 | $direct = 'Try to load type %s from direct method executing'; |
50 | 50 | $context = 'Try to load type %s from %s (%s:%d)'; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function onTypeNotFound(\Closure $then): void |
65 | 65 | { |
66 | - parent::onTypeNotFound(function (string $type, ?Definition $from) use ($then): void { |
|
66 | + parent::onTypeNotFound(function(string $type, ?Definition $from) use ($then) : void { |
|
67 | 67 | if (($file = $then($type, $from)) instanceof Readable) { |
68 | 68 | $this->compiler->compile($file); |
69 | 69 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | * @param \Closure $exception |
49 | 49 | * @return DeferredInterface |
50 | 50 | */ |
51 | - public function catch(\Closure $exception): DeferredInterface |
|
51 | + public function catch (\Closure $exception): DeferredInterface |
|
52 | 52 | { |
53 | 53 | $this->interceptors->push($exception); |
54 | 54 |