Skip to content

Commit

Permalink
Merge pull request #250 from windoo/fix-php8-requirements
Browse files Browse the repository at this point in the history
Fixed nullable arguments in wrong order to ensure PHP8 runs the code
  • Loading branch information
Jalle19 authored Aug 2, 2021
2 parents ca4cacd + eb6846c commit b080756
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 b080756

Please sign in to comment.