Skip to content

Commit

Permalink
Merge pull request #18 from hboomsma/feature/php71_compat
Browse files Browse the repository at this point in the history
Rename Void to Void_ since it is a reserved keyword in PHP7.1
  • Loading branch information
mvriel authored Jun 10, 2016
2 parents 9891754 + d0831c8 commit b39c7a5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ php:
- 5.6
- 7.0
- hhvm
- nightly

matrix:
allow_failures:
- php: hhvm

- php:
- hhvm
- nightly

cache:
directories:
- $HOME/.composer/cache
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"psr-4": {"phpDocumentor\\Reflection\\": ["tests/unit"]}
},
"require-dev": {
"phpunit/phpunit": "^5.2",
"phpunit/phpunit": "^5.2||^4.8.24",
"mockery/mockery": "^0.9.4"
},
"extra": {
Expand Down
2 changes: 1 addition & 1 deletion src/TypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_',
Expand Down
2 changes: 1 addition & 1 deletion src/Types/Void.php → src/Types/Void_.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/TypeResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_'],
Expand Down

0 comments on commit b39c7a5

Please sign in to comment.