From fb854df12402fe0c14dcc74b74c88a4dd8dbf88f Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 21 Feb 2022 13:49:26 +0100 Subject: [PATCH] Update phpstan config --- phpstan/config.neon | 6 +----- tests/Composer/Test/InstallerTest.php | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/phpstan/config.neon b/phpstan/config.neon index 210f3f75d..e5469b6a7 100644 --- a/phpstan/config.neon +++ b/phpstan/config.neon @@ -31,15 +31,11 @@ parameters: - '~^Undefined variable: \$vendorDir$~' - '~^Undefined variable: \$baseDir$~' - # variable defined in eval - - '~^Undefined variable: \$res$~' - # we don't have different constructors for parent/child - '~^Unsafe usage of new static\(\)\.$~' # Ignore some irrelevant errors in test files - - '~Method Composer\\Test\\[^:]+::(setUp(BeforeClass)?|tearDown(AfterClass)?|test[^(]+)\(\) has no return type specified.~' - - '~Method Composer\\Test\\[^:]+::(data\w+|provide\w+|\w+?Provider)\(\) has no return type specified.~' + - '~Method Composer\\Test\\[^:]+::(data\w+|provide\w+|\w+?Provider)\(\) (has no return type specified.|return type has no value type specified in iterable type array.)~' # PHPUnit assertions as instance methods - '~Dynamic call to static method PHPUnit\\Framework\\Assert::\w+\(\)~' diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/InstallerTest.php index 8a2b92d2d..a38d02424 100644 --- a/tests/Composer/Test/InstallerTest.php +++ b/tests/Composer/Test/InstallerTest.php @@ -309,7 +309,7 @@ class InstallerTest extends TestCase { if ($condition) { eval('$res = '.$condition.';'); - if (!$res) { + if (!$res) { // @phpstan-ignore-line $this->markTestSkipped($condition); } }