From 0b8089fe804fc1ae7908bc652176e1693cb6d01d Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 19 Oct 2021 00:04:49 +0200 Subject: [PATCH] Ignore some irrelevant PHPStan errors in test files --- phpstan/config.neon | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpstan/config.neon b/phpstan/config.neon index 0707dac8b..c59a66951 100644 --- a/phpstan/config.neon +++ b/phpstan/config.neon @@ -35,6 +35,11 @@ parameters: # Mock errors - '~^Call to an undefined method (PHPUnit\\Framework\\MockObject\\MockObject|Prophecy\\Prophecy\\ObjectProphecy)::.*$~' + # Ignore some irrelevant errors in test files + - '~Method Composer\\Test\\[^:]+::(setUp(BeforeClass)?|tearDown(AfterClass)?|test[^(]+|get[^(]*?Mock[^(]*)\(\) has no return typehint specified.~' + - '~Method Composer\\Test\\[^:]+::test[^(]+\(\) has parameter \$\w+ with no typehint specified.~' + - '~Method Composer\\Test\\[^:]+::(data\w+|provide\w+|\w+Provider)\(\) has no return typehint specified.~' + # Level 6 TODO #- '~parameter .*? with no typehint specified.$~' #- '~parameter .*? with no value type specified in iterable type array.$~'