Skip to content

Commit 49d7844

Browse files
committed
PHPStan level 6
1 parent b82aa10 commit 49d7844

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
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
}

phpstan.neon.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
parameters:
2+
level: 3
3+
errorFormat: raw
4+
editorUrl: '%%file%% %%line%% %%column%%: %%error%%'
5+
paths:
6+
- src

src/PHPFUI/PHPUnitSyntaxCoverage/ClassFinder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)