@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | protected $parents = []; |
26 | 26 | |
27 | 27 | /** |
28 | - * @return iterable|TypeDefinition[] |
|
28 | + * @return \Generator |
|
29 | 29 | */ |
30 | 30 | public function getParents(): iterable |
31 | 31 | { |
@@ -54,7 +54,8 @@ discard block |
||
54 | 54 | |
55 | 55 | /** |
56 | 56 | * @param TypeDefinition ...$definitions |
57 | - * @return ProvidesInheritance|$this |
|
57 | + * @param TypeDefinition[] $definitions |
|
58 | + * @return TypeDefinition[] |
|
58 | 59 | * @throws TypeConflictException |
59 | 60 | */ |
60 | 61 | public function extends(TypeDefinition ...$definitions): ProvidesInheritance |
@@ -74,7 +74,7 @@ |
||
74 | 74 | */ |
75 | 75 | private function verifyExtensionType(TypeDefinition $def): void |
76 | 76 | { |
77 | - if (! $this::typeOf($def::getType())) { |
|
77 | + if (!$this::typeOf($def::getType())) { |
|
78 | 78 | $error = \sprintf('Type %s can extends only %s types, but %s given.', $this, static::getType(), $def); |
79 | 79 | throw new TypeConflictException($error); |
80 | 80 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
53 | - * @return iterable|InterfaceDefinition[] |
|
53 | + * @return \Generator |
|
54 | 54 | */ |
55 | 55 | public function getInterfaces(): iterable |
56 | 56 | { |
@@ -79,6 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | /** |
81 | 81 | * @param InterfaceDefinition ...$interfaces |
82 | + * @param InterfaceDefinition[] $interfaces |
|
82 | 83 | * @return ProvidesInterfaces|$this |
83 | 84 | */ |
84 | 85 | public function implements(InterfaceDefinition ...$interfaces): ProvidesInterfaces |
@@ -67,6 +67,7 @@ |
||
67 | 67 | |
68 | 68 | /** |
69 | 69 | * @param int ...$values |
70 | + * @param integer[] $values |
|
70 | 71 | * @return ProvidesTypeIndication|$this |
71 | 72 | */ |
72 | 73 | public function withModifiers(int ...$values): ProvidesTypeIndication |
@@ -110,7 +110,7 @@ |
||
110 | 110 | * @version SDL June 2018 |
111 | 111 | * @var string |
112 | 112 | */ |
113 | - public const INTERFACE = 'INTERFACE'; |
|
113 | + public const INTERFACE = 'INTERFACE'; |
|
114 | 114 | |
115 | 115 | /** |
116 | 116 | * @version SDL June 2018 |
@@ -70,7 +70,7 @@ |
||
70 | 70 | */ |
71 | 71 | private function bootInheritance(\SplStack $stack, array $children = []): void |
72 | 72 | { |
73 | - $push = function (string $type) use ($stack): void { |
|
73 | + $push = function(string $type) use ($stack): void { |
|
74 | 74 | self::$inheritance[$type] = \array_values(\iterator_to_array($stack)); |
75 | 75 | self::$inheritance[$type][] = static::ROOT_TYPE; |
76 | 76 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | /** |
33 | 33 | * @var string |
34 | 34 | */ |
35 | - public const STDLIB_SCHEMA_PATH = __DIR__ . '/../../resources/stdlib.graphqls'; |
|
35 | + public const STDLIB_SCHEMA_PATH = __DIR__.'/../../resources/stdlib.graphqls'; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * GraphQLDocument constructor. |
@@ -52,7 +52,7 @@ |
||
52 | 52 | $this->withDescription(self::TYPE_DESCRIPTION) |
53 | 53 | ->withArgument((new ArgumentDefinition($this, $document, 'if', 'Boolean')) |
54 | 54 | ->withModifiers(ArgumentDefinition::IS_NOT_NULL)) |
55 | - ->withLocation(...\array_map(function (string $location) use ($document): DirectiveLocation { |
|
55 | + ->withLocation(...\array_map(function(string $location) use ($document): DirectiveLocation { |
|
56 | 56 | return new DirectiveLocation($this, $document, $location); |
57 | 57 | }, self::LOCATIONS)); |
58 | 58 | } |
@@ -58,9 +58,9 @@ |
||
58 | 58 | parent::__construct($document, self::TYPE_NAME); |
59 | 59 | |
60 | 60 | $this->withDescription(self::TYPE_DESCRIPTION) |
61 | - ->withArgument((new ArgumentDefinition($this, $document, 'reason','String')) |
|
61 | + ->withArgument((new ArgumentDefinition($this, $document, 'reason', 'String')) |
|
62 | 62 | ->withDefaultValue('No longer supported')) |
63 | - ->withLocation(...\array_map(function (string $location) use ($document): DirectiveLocation { |
|
63 | + ->withLocation(...\array_map(function(string $location) use ($document): DirectiveLocation { |
|
64 | 64 | return new DirectiveLocation($this, $document, $location); |
65 | 65 | }, self::LOCATIONS)); |
66 | 66 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $this->withDescription(self::TYPE_DESCRIPTION) |
54 | 54 | ->withArgument((new ArgumentDefinition($this, $document, 'if', 'Boolean')) |
55 | 55 | ->withModifiers(ArgumentDefinition::IS_NOT_NULL)) |
56 | - ->withLocation(...\array_map(function (string $location) use ($document): DirectiveLocation { |
|
56 | + ->withLocation(...\array_map(function(string $location) use ($document): DirectiveLocation { |
|
57 | 57 | return new DirectiveLocation($this, $document, $location); |
58 | 58 | }, self::LOCATIONS)); |
59 | 59 | } |