Skip to content

Commit 2823fae

Browse files
committed
Fix review
1 parent 5837e20 commit 2823fae

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Config/Parser/AnnotationParser.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,15 @@ private static function typeAnnotationToGQLConfiguration(
258258
$schemaQuery = $schema['query'] ?? null;
259259
$schemaMutation = $schema['mutation'] ?? null;
260260

261-
if ($schemaQuery && $gqlName === $schemaQuery) {
261+
if ($gqlName === $schemaQuery) {
262262
$isRoot = true;
263-
if ($defaultSchemaName == $schemaName) {
263+
if ($defaultSchemaName === $schemaName) {
264264
$isDefault = true;
265265
}
266-
} elseif ($schemaMutation && $gqlName === $schemaMutation) {
266+
} elseif ($gqlName === $schemaMutation) {
267267
$isMutation = true;
268268
$isRoot = true;
269-
if ($defaultSchemaName == $schemaName) {
269+
if ($defaultSchemaName === $schemaName) {
270270
$isDefault = true;
271271
}
272272
}

src/DataCollector/GraphQLCollector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function collect(Request $request, Response $response, Throwable $excepti
2828
{
2929
$error = false;
3030
$count = 0;
31-
$schema = false;
31+
$schema = null;
3232
foreach ($this->batches as $batch) {
3333
if (!$schema) {
3434
$schema = $batch['schema'];
@@ -68,9 +68,9 @@ public function getCount(): int
6868
*
6969
* @return string|false
7070
*/
71-
public function getSchema()
71+
public function getSchema(): ?string
7272
{
73-
return $this->data['schema'] ?? 'default';
73+
return $this->data['schema'];
7474
}
7575

7676
/**

0 commit comments

Comments
 (0)