File tree Expand file tree Collapse file tree 4 files changed +12
-3
lines changed
src/PHPFUI/PHPUnitSyntaxCoverage Expand file tree Collapse file tree 4 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1- # PHPUnitSyntaxCoverage [ ![ Tests] ( https://github.com/phpfui/PHPUnitSyntaxCoverage/actions/workflows/tests.yml/badge.svg )] ( https://github.com/phpfui/PHPUnitSyntaxCoverage/actions?query=workflow%3Atests ) [ ![ Latest Packagist release] ( https://img.shields.io/packagist/v/phpfui/phpunit-syntax-coverage.svg )] ( https://packagist.org/packages/phpfui/phpunit-syntax-coverage )
1+ # PHPUnitSyntaxCoverage [ ![ Tests] ( https://github.com/phpfui/PHPUnitSyntaxCoverage/actions/workflows/tests.yml/badge.svg )] ( https://github.com/phpfui/PHPUnitSyntaxCoverage/actions?query=workflow%3Atests ) [ ![ Latest Packagist release] ( https://img.shields.io/packagist/v/phpfui/phpunit-syntax-coverage.svg )] ( https://packagist.org/packages/phpfui/phpunit-syntax-coverage ) ![ ] ( https://img.shields.io/badge/PHPStan-level%206-brightgreen.svg?style=flat )
22
33## PHPUnit Extension for complete PHP Syntax Code Coverage
44
Original file line number Diff line number Diff line change 2727 "phpunit/phpunit" : " >=8.0" ,
2828 "roave/security-advisories" : " dev-latest" ,
2929 "friendsofphp/php-cs-fixer" : " ^3.0" ,
30- "symfony/translation-contracts" : " >=2.3"
30+ "symfony/translation-contracts" : " >=2.3" ,
31+ "phpstan/phpstan" : " ^1.8"
3132 }
3233}
Original file line number Diff line number Diff line change 1+ parameters:
2+ level: 3
3+ errorFormat: raw
4+ editorUrl: '%%file%% %%line%% %%column%%: %%error%%'
5+ paths:
6+ - src
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class ClassFinder extends \PhpParser\NodeVisitorAbstract
1818
1919 private string $ currentNamespace = '' ;
2020
21- public function enterNode (\PhpParser \Node $ node ) : void
21+ public function enterNode (int | \PhpParser \Node | null $ node )
2222 {
2323 if ($ node instanceof \PhpParser \Node \Stmt \Namespace_)
2424 {
@@ -28,6 +28,8 @@ public function enterNode(\PhpParser\Node $node) : void
2828 {
2929 $ this ->classes [] = $ this ->currentNamespace ? $ this ->currentNamespace . '\\' . $ node ->name ->name : $ node ->name ->name ;
3030 }
31+
32+ return $ node ;
3133 }
3234
3335 public function getNamespace () : string
You can’t perform that action at this time.
0 commit comments