Skip to content

Commit 118212c

Browse files
committed
fix param type namespace problem
1 parent 7e8e33e commit 118212c

13 files changed

+42
-42
lines changed

src/Types/GraphQLBoolean.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class GraphQLBoolean extends GraphQLScalarType
99
protected $type = "Boolean";
1010
protected $description = "Default GraphQL Boolean Type";
1111

12-
public function serialize($outputValue): ?\bool
12+
public function serialize($outputValue): ?bool
1313
{
1414
if (!is_bool($outputValue) and $outputValue !== null) {
1515
throw new GraphQLError(
@@ -30,7 +30,7 @@ public function parseLiteral($valueNode, $variables)
3030
return $valueNode["value"];
3131
}
3232

33-
public function parseValue($value): ?\bool
33+
public function parseValue($value): ?bool
3434
{
3535
if (!is_bool($value) and $value !== null) {
3636
throw new GraphQLError(

src/Types/GraphQLEnum.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class GraphQLEnum extends GraphQLType
1212

1313
private $values = [];
1414

15-
public function __construct(\string $type, \string $description, ?array $values)
15+
public function __construct(string $type, string $description, ?array $values)
1616
{
1717
$this->type = $type;
1818
$this->description = $description;
@@ -57,7 +57,7 @@ public function parseLiteral($valueNode, $variables)
5757
return $value;
5858
}
5959

60-
public function parseValue($value): \string
60+
public function parseValue($value): string
6161
{
6262
if (!is_string($value)) {
6363
throw new GraphQLError(

src/Types/GraphQLFloat.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class GraphQLFloat extends GraphQLScalarType
99
protected $type = "Float";
1010
protected $description = "Default GraphQL Float Type";
1111

12-
public function serialize($outputValue): ?\float
12+
public function serialize($outputValue): ?float
1313
{
1414
if (!is_float($outputValue) and $outputValue !== null) {
1515
throw new GraphQLError(
@@ -19,7 +19,7 @@ public function serialize($outputValue): ?\float
1919
return $outputValue;
2020
}
2121

22-
public function parseLiteral($valueNode, $variables): \float
22+
public function parseLiteral($valueNode, $variables): float
2323
{
2424
if ($valueNode["kind"] !== "IntValue" and $valueNode["kind"] !== "FloatValue") {
2525
throw new GraphQLError(
@@ -38,7 +38,7 @@ public function parseLiteral($valueNode, $variables): \float
3838
return floatval($valueNode["value"]);
3939
}
4040

41-
public function parseValue($value): ?\float
41+
public function parseValue($value): ?float
4242
{
4343
if (!is_float($value) and $value !== null) {
4444
throw new GraphQLError(

src/Types/GraphQLID.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class GraphQLID extends GraphQLScalarType
99
protected $type = "ID";
1010
protected $description = "Default GraphQL ID Type";
1111

12-
public function serialize($outputValue): ?\string
12+
public function serialize($outputValue): ?string
1313
{
1414
if (!is_string($outputValue) and $outputValue !== null) {
1515
throw new GraphQLError(
@@ -30,7 +30,7 @@ public function parseLiteral($valueNode, $variables)
3030
return $valueNode["value"];
3131
}
3232

33-
public function parseValue($value): ?\string
33+
public function parseValue($value): ?string
3434
{
3535
if (!is_string($value) and $value !== null) {
3636
throw new GraphQLError(

src/Types/GraphQLInputObjectType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class GraphQLInputObjectType extends GraphQLObjectType
1111
protected $description;
1212

1313
public function __construct(
14-
\string $type,
15-
\string $description,
14+
string $type,
15+
string $description,
1616
Closure $fields
1717
)
1818
{

src/Types/GraphQLInt.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class GraphQLInt extends GraphQLScalarType
99
protected $type = "Int";
1010
protected $description = "Default GraphQL Integer Type";
1111

12-
public function serialize($outputValue): ?\int
12+
public function serialize($outputValue): ?int
1313
{
1414
if (!is_int($outputValue) and $outputValue !== null) {
1515
throw new GraphQLError(
@@ -19,7 +19,7 @@ public function serialize($outputValue): ?\int
1919
return $outputValue;
2020
}
2121

22-
public function parseLiteral($valueNode, $variables): \int
22+
public function parseLiteral($valueNode, $variables): int
2323
{
2424
if ($valueNode["kind"] !== "IntValue") {
2525
throw new GraphQLError(
@@ -39,7 +39,7 @@ public function parseLiteral($valueNode, $variables): \int
3939
return $num;
4040
}
4141

42-
public function parseValue($value): ?\int
42+
public function parseValue($value): ?int
4343
{
4444
if (!is_int($value) and $value !== null) {
4545
throw new GraphQLError(

src/Types/GraphQLInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class GraphQLInterface extends GraphQLAbstractType
1212
private $fields;
1313
private $resolveTypeFn;
1414

15-
public function __construct(\string $type, \string $description, Closure $fields, ?Closure $resolveTypeFn = null)
15+
public function __construct(string $type, string $description, Closure $fields, ?Closure $resolveTypeFn = null)
1616
{
1717
$this->type = $type;
1818
$this->description = $description;

src/Types/GraphQLList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class GraphQLList extends GraphQLType
1313

1414
private $innerType;
1515

16-
public function getName(): \string
16+
public function getName(): string
1717
{
1818
return parent::getName() . "({$this->getInnerType()->getName()})";
1919
}

src/Types/GraphQLNonNull.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class GraphQLNonNull extends GraphQLType
1111

1212
private $innerType;
1313

14-
public function getName(): \string
14+
public function getName(): string
1515
{
1616
return parent::getName() . "({$this->getInnerType()->getName()})";
1717
}

src/Types/GraphQLObjectType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class GraphQLObjectType extends GraphQLType
1414
private $interfaces;
1515
private $isTypeOfFn;
1616

17-
public function __construct(\string $type, \string $description, Closure $fields, ?array $interfaces = null, ?Closure $isTypeOfFn = null)
17+
public function __construct(string $type, string $description, Closure $fields, ?array $interfaces = null, ?Closure $isTypeOfFn = null)
1818
{
1919
$this->type = $type;
2020
$this->description = $description;
@@ -89,7 +89,7 @@ public function isTypeOf($value, $contextValue, $info)
8989
* @param string $type
9090
* @return GraphQLObjectType
9191
*/
92-
public function setType(\string $type): GraphQLObjectType
92+
public function setType(string $type): GraphQLObjectType
9393
{
9494
$this->type = $type;
9595
return $this;
@@ -99,7 +99,7 @@ public function setType(\string $type): GraphQLObjectType
9999
* @param string $description
100100
* @return GraphQLObjectType
101101
*/
102-
public function setDescription(\string $description): GraphQLObjectType
102+
public function setDescription(string $description): GraphQLObjectType
103103
{
104104
$this->description = $description;
105105
return $this;

0 commit comments

Comments
 (0)