From a548a61307b1994eef23648e0c5f56b73e6c1e23 Mon Sep 17 00:00:00 2001 From: Julien Pauli Date: Thu, 9 Jun 2016 10:44:30 +0200 Subject: [PATCH] Renamed type Void as this is a reserved keyword in PHP 7.1 --- src/TypeResolver.php | 2 +- src/Types/{Void.php => Void_.php} | 2 +- tests/unit/TypeResolverTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/Types/{Void.php => Void_.php} (96%) diff --git a/src/TypeResolver.php b/src/TypeResolver.php index 23dd2c1..3a68a4d 100644 --- a/src/TypeResolver.php +++ b/src/TypeResolver.php @@ -38,7 +38,7 @@ final class TypeResolver 'mixed' => 'phpDocumentor\Reflection\Types\Mixed', 'array' => 'phpDocumentor\Reflection\Types\Array_', 'resource' => 'phpDocumentor\Reflection\Types\Resource', - 'void' => 'phpDocumentor\Reflection\Types\Void', + 'void' => 'phpDocumentor\Reflection\Types\Void_', 'null' => 'phpDocumentor\Reflection\Types\Null_', 'scalar' => 'phpDocumentor\Reflection\Types\Scalar', 'callback' => 'phpDocumentor\Reflection\Types\Callable_', diff --git a/src/Types/Void.php b/src/Types/Void_.php similarity index 96% rename from src/Types/Void.php rename to src/Types/Void_.php index 6a6156b..3d1be27 100644 --- a/src/Types/Void.php +++ b/src/Types/Void_.php @@ -20,7 +20,7 @@ * Void is generally only used when working with return types as it signifies that the method intentionally does not * return any value. */ -final class Void implements Type +final class Void_ implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. diff --git a/tests/unit/TypeResolverTest.php b/tests/unit/TypeResolverTest.php index bdea120..f226f8e 100644 --- a/tests/unit/TypeResolverTest.php +++ b/tests/unit/TypeResolverTest.php @@ -373,7 +373,7 @@ public function provideKeywords() ['scalar', 'phpDocumentor\Reflection\Types\Scalar'], ['object', 'phpDocumentor\Reflection\Types\Object_'], ['mixed', 'phpDocumentor\Reflection\Types\Mixed'], - ['void', 'phpDocumentor\Reflection\Types\Void'], + ['void', 'phpDocumentor\Reflection\Types\Void_'], ['$this', 'phpDocumentor\Reflection\Types\This'], ['static', 'phpDocumentor\Reflection\Types\Static_'], ['self', 'phpDocumentor\Reflection\Types\Self_'],