Skip to content

Commit 3a43ef2

Browse files
author
Hidde Boomsma
committed
Rename Void to Void_ since it is a reserved keyword in PHP7.1
Fixing the followint failure: 1) phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #15 ('void', 'phpDocumentor\Reflection\Types\Void') PHPUnit_Framework_Exception: Argument #1 (No Value) of PHPUnit_Framework_Assert::assertInstanceOf() must be a class or interface name
1 parent 9891754 commit 3a43ef2

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ php:
44
- 5.6
55
- 7.0
66
- hhvm
7+
- nightly
78

89
matrix:
910
allow_failures:
10-
- php: hhvm
11-
11+
- php:
12+
- hhvm
13+
- nightly
14+
1215
cache:
1316
directories:
1417
- $HOME/.composer/cache

src/TypeResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ final class TypeResolver
3838
'mixed' => 'phpDocumentor\Reflection\Types\Mixed',
3939
'array' => 'phpDocumentor\Reflection\Types\Array_',
4040
'resource' => 'phpDocumentor\Reflection\Types\Resource',
41-
'void' => 'phpDocumentor\Reflection\Types\Void',
41+
'void' => 'phpDocumentor\Reflection\Types\Void_',
4242
'null' => 'phpDocumentor\Reflection\Types\Null_',
4343
'scalar' => 'phpDocumentor\Reflection\Types\Scalar',
4444
'callback' => 'phpDocumentor\Reflection\Types\Callable_',

src/Types/Void.php renamed to src/Types/Void_.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* Void is generally only used when working with return types as it signifies that the method intentionally does not
2121
* return any value.
2222
*/
23-
final class Void implements Type
23+
final class Void_ implements Type
2424
{
2525
/**
2626
* Returns a rendered output of the Type as it would be used in a DocBlock.

tests/unit/TypeResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public function provideKeywords()
373373
['scalar', 'phpDocumentor\Reflection\Types\Scalar'],
374374
['object', 'phpDocumentor\Reflection\Types\Object_'],
375375
['mixed', 'phpDocumentor\Reflection\Types\Mixed'],
376-
['void', 'phpDocumentor\Reflection\Types\Void'],
376+
['void', 'phpDocumentor\Reflection\Types\Void_'],
377377
['$this', 'phpDocumentor\Reflection\Types\This'],
378378
['static', 'phpDocumentor\Reflection\Types\Static_'],
379379
['self', 'phpDocumentor\Reflection\Types\Self_'],

0 commit comments

Comments
 (0)