Skip to content

Commit 10a2a4a

Browse files
committed
Fix code style
1 parent e0c45d7 commit 10a2a4a

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

src/Types/EntityObjectType.php

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,16 @@ class EntityObjectType extends ObjectType
5050
public const FIELD_DIRECTIVE_PROVIDES = 'provides';
5151
public const FIELD_DIRECTIVE_REQUIRES = 'requires';
5252

53-
/** @var array */
54-
private $keyFields;
55-
5653
/** @var callable|null */
5754
public $referenceResolver = null;
5855

5956
/**
60-
* @param mixed[] $config
57+
* @var array<int,string>|array<int|string,string|array<int|string,mixed>>
58+
*/
59+
private array $keyFields;
60+
61+
/**
62+
* @param array<string,mixed> $config
6163
*/
6264
public function __construct(array $config)
6365
{
@@ -74,7 +76,7 @@ public function __construct(array $config)
7476
/**
7577
* Gets the fields that serve as the unique key or identifier of the entity.
7678
*
77-
* @return array
79+
* @return array<int,string>|array<int|string,string|array<int|string,mixed>>
7880
*/
7981
public function getKeyFields(): array
8082
{
@@ -106,30 +108,23 @@ public function resolveReference($ref, $context = null, $info = null)
106108
return ($this->referenceResolver)($ref, $context, $info);
107109
}
108110

109-
/**
110-
* @return void
111-
*/
112-
private function validateReferenceResolver()
111+
private function validateReferenceResolver(): void
113112
{
114113
Utils::invariant(isset($this->referenceResolver), 'No reference resolver was set in the configuration.');
115114
}
116115

117116
/**
118117
* @param array{ __typename: mixed } $ref
119-
*
120-
* @return void
121118
*/
122-
private function validateReferenceKeys($ref)
119+
private function validateReferenceKeys(array $ref): void
123120
{
124121
Utils::invariant(isset($ref[FederatedSchema::RESERVED_FIELD_TYPE_NAME]), 'Type name must be provided in the reference.');
125122
}
126123

127124
/**
128125
* @param array{ __resolveReference: mixed } $config
129-
*
130-
* @return void
131126
*/
132-
public static function validateResolveReference(array $config)
127+
public static function validateResolveReference(array $config): void
133128
{
134129
Utils::invariant(\is_callable($config[self::FIELD_REFERENCE_RESOLVER]), 'Reference resolver has to be callable.');
135130
}

0 commit comments

Comments
 (0)