Fixed type hint and added PHPStan to travis
This commit is contained in:
Родитель
77043f0a09
Коммит
7f0d68bdf0
|
@ -30,6 +30,7 @@ before_script:
|
|||
|
||||
script:
|
||||
- composer validate
|
||||
- ./vendor/bin/phpstan analyse src --level=2
|
||||
- |
|
||||
if [[ $VALIDATION = true ]]; then
|
||||
./vendor/bin/phpunit --testsuite validation
|
||||
|
|
|
@ -72,8 +72,11 @@ class Token implements \JsonSerializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the token kind name as a string, or the token number if the name
|
||||
* was not found.
|
||||
*
|
||||
* @param int $kind
|
||||
* @return string (Or int, if the kind name for $kind wasn't found)
|
||||
* @return int|string
|
||||
*/
|
||||
public static function getTokenKindNameFromValue($kind) {
|
||||
$mapToKindName = self::getTokenKindNameFromValueMap();
|
||||
|
|
Загрузка…
Ссылка в новой задаче