diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 8c65a7b7..528c383f 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -188,42 +188,12 @@ parameters: count: 1 path: tests/Unit/Css/CssDocumentTest.php - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Pelago\\\\Emogrifier\\\\CssInliner'' and Pelago\\Emogrifier\\CssInliner will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/Unit/CssInlinerTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Pelago\\\\Emogrifier\\\\HtmlProcessor\\\\AbstractHtmlProcessor'' and Pelago\\Emogrifier\\CssInliner will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/Unit/CssInlinerTest.php - - message: '#^Parameter \#1 \$string of function trim expects string, string\|false given\.$#' identifier: argument.type count: 1 path: tests/Unit/CssInlinerTest.php - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''DOMDocument'' and DOMDocument will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/Unit/HtmlProcessor/AbstractHtmlProcessorTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Pelago\\\\Emogrifier\\\\HtmlProcessor\\\\AbstractHtmlProcessor'' and Pelago\\Emogrifier\\Tests\\Unit\\HtmlProcessor\\Fixtures\\TestingHtmlProcessor will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/Unit/HtmlProcessor/AbstractHtmlProcessorTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Pelago\\\\Emogrifier\\\\Tests\\\\Unit\\\\HtmlProcessor\\\\Fixtures\\\\TestingHtmlProcessor'' and Pelago\\Emogrifier\\Tests\\Unit\\HtmlProcessor\\Fixtures\\TestingHtmlProcessor will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/Unit/HtmlProcessor/AbstractHtmlProcessorTest.php - - message: '#^Parameter \#1 \$string of function strtolower expects string, string\|false given\.$#' identifier: argument.type @@ -236,66 +206,12 @@ parameters: count: 1 path: tests/Unit/HtmlProcessor/AbstractHtmlProcessorTest.php - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Pelago\\\\Emogrifier\\\\HtmlProcessor\\\\AbstractHtmlProcessor'' and Pelago\\Emogrifier\\HtmlProcessor\\CssToAttributeConverter will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/Unit/HtmlProcessor/CssToAttributeConverterTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Pelago\\\\Emogrifier\\\\HtmlProcessor\\\\CssToAttributeConverter'' and Pelago\\Emogrifier\\HtmlProcessor\\CssToAttributeConverter will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/Unit/HtmlProcessor/CssToAttributeConverterTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Pelago\\\\Emogrifier\\\\HtmlProcessor\\\\AbstractHtmlProcessor'' and Pelago\\Emogrifier\\HtmlProcessor\\HtmlNormalizer will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/Unit/HtmlProcessor/HtmlNormalizerTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Pelago\\\\Emogrifier\\\\HtmlProcessor\\\\HtmlNormalizer'' and Pelago\\Emogrifier\\HtmlProcessor\\HtmlNormalizer will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/Unit/HtmlProcessor/HtmlNormalizerTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Pelago\\\\Emogrifier\\\\HtmlProcessor\\\\AbstractHtmlProcessor'' and Pelago\\Emogrifier\\HtmlProcessor\\HtmlPruner will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/Unit/HtmlProcessor/HtmlPrunerTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Pelago\\\\Emogrifier\\\\HtmlProcessor\\\\HtmlPruner'' and Pelago\\Emogrifier\\HtmlProcessor\\HtmlPruner will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/Unit/HtmlProcessor/HtmlPrunerTest.php - - message: '#^Offset 1 might not exist on array\\>\|null\.$#' identifier: offsetAccess.notFound count: 1 path: tests/Unit/HtmlProcessor/HtmlPrunerTest.php - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''PHPUnit\\\\Framework\\\\Constraint\\\\Constraint'' and Pelago\\Emogrifier\\Tests\\Support\\Constraint\\IsEquivalentCss will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/Unit/Support/Traits/AssertCssTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''PHPUnit\\\\Framework\\\\Constraint\\\\Constraint'' and Pelago\\Emogrifier\\Tests\\Support\\Constraint\\StringContainsCss will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/Unit/Support/Traits/AssertCssTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''PHPUnit\\\\Framework\\\\Constraint\\\\Constraint'' and Pelago\\Emogrifier\\Tests\\Support\\Constraint\\StringContainsCssCount will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/Unit/Support/Traits/AssertCssTest.php - - message: '#^Parameter \#1 \$array of function array_filter expects array, array\\>\|null given\.$#' identifier: argument.type diff --git a/phpstan.neon b/phpstan.neon index 94aebbde..cd440723 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,3 +7,8 @@ parameters: paths: - src - tests + + ignoreErrors: + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) .* will always evaluate to#' + path: 'tests/'