Skip to content

Commit b39c7a5

Browse files
authored
Merge pull request #18 from hboomsma/feature/php71_compat
Rename Void to Void_ since it is a reserved keyword in PHP7.1
2 parents 9891754 + d0831c8 commit b39c7a5

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"psr-4": {"phpDocumentor\\Reflection\\": ["tests/unit"]}
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "^5.2",
19+
"phpunit/phpunit": "^5.2||^4.8.24",
2020
"mockery/mockery": "^0.9.4"
2121
},
2222
"extra": {

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)