Skip to content

Commit

Permalink
Fixed nullable arguments in wrong order to ensure PHP8 runs the code
Browse files Browse the repository at this point in the history
  • Loading branch information
florentdestremau committed Jul 20, 2021
1 parent ca4cacd commit eb6846c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Introspection/Field/TypeDefinitionField.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TypeDefinitionField extends AbstractField

use TypeCollectorTrait;

public function resolve($value = null, array $args, ResolveInfo $info)
public function resolve($value, array $args, ResolveInfo $info)
{
$schema = $info->getExecutionContext()->getSchema();
$this->collectTypes($schema->getQueryType());
Expand Down
6 changes: 3 additions & 3 deletions src/Parser/Ast/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class Field extends AbstractAst implements FieldInterface
/** @var string */
private $name;

/** @var null|string */
private $alias = null;
/** @var string */
private $alias;

/**
* @param string $name
Expand Down Expand Up @@ -81,4 +81,4 @@ public function getFields()
return [];
}

}
}
2 changes: 1 addition & 1 deletion src/Parser/Ast/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Query extends AbstractAst implements FieldInterface
* @param array $directives
* @param Location $location
*/
public function __construct($name, $alias = '', array $arguments, array $fields, array $directives, Location $location)
public function __construct($name, $alias, array $arguments, array $fields, array $directives, Location $location)
{
parent::__construct($location);

Expand Down

0 comments on commit eb6846c

Please sign in to comment.