mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-11-30 04:29:20 +01:00
Integrate PHPStan analysis (#1)
This commit is contained in:
parent
4e272700b3
commit
3fed7e24cb
18
build.xml
18
build.xml
@ -6,7 +6,8 @@
|
||||
composer-install,
|
||||
lint,
|
||||
cs,
|
||||
tests
|
||||
tests,
|
||||
phpstan
|
||||
"/>
|
||||
|
||||
<target name="composer-validate">
|
||||
@ -95,4 +96,19 @@
|
||||
<arg path="tests"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="phpstan">
|
||||
<exec
|
||||
executable="vendor/bin/phpstan"
|
||||
logoutput="true"
|
||||
passthru="true"
|
||||
checkreturn="true"
|
||||
>
|
||||
<arg value="analyse"/>
|
||||
<arg value="--level"/>
|
||||
<arg value="7"/>
|
||||
<arg path="src"/>
|
||||
<arg path="tests"/>
|
||||
</exec>
|
||||
</target>
|
||||
</project>
|
||||
|
@ -2,6 +2,8 @@
|
||||
"name": "phpstan/phpdoc-parser",
|
||||
"description": "PHPDoc parser with support for nullable, intersection and generic types",
|
||||
"license": "MIT",
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": "~7.0"
|
||||
},
|
||||
@ -9,10 +11,14 @@
|
||||
"consistence/coding-standard": "^2.0.0",
|
||||
"jakub-onderka/php-parallel-lint": "^0.9.2",
|
||||
"phing/phing": "^2.16.0",
|
||||
"phpstan/phpstan": "^0.9",
|
||||
"phpunit/phpunit": "^6.3",
|
||||
"slevomat/coding-standard": "^3.3.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {"PHPStan\\PhpDocParser\\": ["src/"]}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {"PHPStan\\PhpDocParser\\": ["tests/PHPStan"]}
|
||||
}
|
||||
}
|
||||
|
@ -86,6 +86,8 @@ class Lexer
|
||||
}
|
||||
|
||||
preg_match_all($this->regexp, $s, $tokens, PREG_SET_ORDER);
|
||||
|
||||
assert($this->types !== null);
|
||||
$count = count($this->types);
|
||||
|
||||
foreach ($tokens as &$match) {
|
||||
|
Loading…
Reference in New Issue
Block a user