Skip to content

Replace self:: with static:: in schema printer #1380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Utils/SchemaPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ protected static function printSchemaDefinition(Schema $schema): ?string
// TODO add condition for schema.description
// Only print a schema definition if there is a description or if it should
// not be omitted because of having default type names.
if (! self::hasDefaultRootOperationTypes($schema)) {
if (! static::hasDefaultRootOperationTypes($schema)) {
return "schema {\n"
. ($queryType !== null ? " query: {$queryType->name}\n" : '')
. ($mutationType !== null ? " mutation: {$mutationType->name}\n" : '')
Expand Down Expand Up @@ -378,7 +378,7 @@ protected static function printObject(ObjectType $type, array $options): string
{
return static::printDescription($options, $type)
. "type {$type->name}"
. self::printImplementedInterfaces($type)
. static::printImplementedInterfaces($type)
. static::printFields($options, $type);
}

Expand Down Expand Up @@ -420,7 +420,7 @@ protected static function printFields(array $options, $type): string
$previousHasDescription = $hasDescription;
}

return self::printBlock($fields);
return static::printBlock($fields);
}

/**
Expand Down Expand Up @@ -477,7 +477,7 @@ protected static function printInterface(InterfaceType $type, array $options): s
{
return static::printDescription($options, $type)
. "interface {$type->name}"
. self::printImplementedInterfaces($type)
. static::printImplementedInterfaces($type)
. static::printFields($options, $type);
}

Expand Down