diff --git a/phpstan/baseline-8.1.neon b/phpstan/baseline-8.1.neon index ee7346d3a8bd..f69bb635e8dc 100644 --- a/phpstan/baseline-8.1.neon +++ b/phpstan/baseline-8.1.neon @@ -65,11 +65,6 @@ parameters: count: 1 path: ../src/Composer/Command/ValidateCommand.php - - - message: "#^Parameter \\#1 \\$string of function substr_replace expects array\\|string, string\\|false given\\.$#" - count: 1 - path: ../src/Composer/Compiler.php - - message: "#^Parameter \\#1 \\$string of function rtrim expects string, int\\|string\\|null given\\.$#" count: 1 @@ -90,11 +85,6 @@ parameters: count: 2 path: ../src/Composer/DependencyResolver/Problem.php - - - message: "#^Parameter \\#1 \\$string of function trim expects string, array\\\\>\\|string\\|false given\\.$#" - count: 1 - path: ../src/Composer/Downloader/FileDownloader.php - - message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" count: 1 diff --git a/phpstan/baseline.neon b/phpstan/baseline.neon index 7eced10576a5..75f0c68e9bb1 100644 --- a/phpstan/baseline.neon +++ b/phpstan/baseline.neon @@ -1337,7 +1337,7 @@ parameters: - message: "#^Only booleans are allowed in an if condition, string\\|null given\\.$#" - count: 3 + count: 2 path: ../src/Composer/Command/StatusCommand.php - @@ -1435,11 +1435,6 @@ parameters: count: 1 path: ../src/Composer/Compiler.php - - - message: "#^Parameter \\#1 \\$haystack of function strpos expects string, string\\|false given\\.$#" - count: 1 - path: ../src/Composer/Compiler.php - - message: "#^Parameter \\#1 \\$source of method Composer\\\\Compiler\\:\\:stripWhitespace\\(\\) expects string, string\\|false given\\.$#" count: 1 @@ -1447,11 +1442,6 @@ parameters: - message: "#^Parameter \\#1 \\$str of function strtr expects string, string\\|false given\\.$#" - count: 2 - path: ../src/Composer/Compiler.php - - - - message: "#^Parameter \\#1 \\$str of function substr_replace expects array\\|string, string\\|false given\\.$#" count: 1 path: ../src/Composer/Compiler.php @@ -2280,11 +2270,6 @@ parameters: count: 2 path: ../src/Composer/Downloader/FileDownloader.php - - - message: "#^Parameter \\#1 \\$str of function trim expects string, array\\\\>\\|string\\|false given\\.$#" - count: 1 - path: ../src/Composer/Downloader/FileDownloader.php - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" count: 4 @@ -2295,11 +2280,6 @@ parameters: count: 5 path: ../src/Composer/Downloader/FossilDownloader.php - - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" - count: 1 - path: ../src/Composer/Downloader/FossilDownloader.php - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" count: 5 @@ -2335,11 +2315,6 @@ parameters: count: 1 path: ../src/Composer/Downloader/GitDownloader.php - - - message: "#^Only booleans are allowed in a negated boolean, string\\|null given\\.$#" - count: 1 - path: ../src/Composer/Downloader/GitDownloader.php - - message: "#^Only booleans are allowed in an if condition, string\\|false given\\.$#" count: 2 @@ -2360,11 +2335,6 @@ parameters: count: 1 path: ../src/Composer/Downloader/GitDownloader.php - - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" - count: 1 - path: ../src/Composer/Downloader/GitDownloader.php - - message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#" count: 1 @@ -2400,26 +2370,11 @@ parameters: count: 3 path: ../src/Composer/Downloader/HgDownloader.php - - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" - count: 1 - path: ../src/Composer/Downloader/HgDownloader.php - - message: "#^Call to function in_array\\(\\) with arguments 20, array\\{0\\: 10\\|20, 1\\?\\: 20\\} and true will always evaluate to true\\.$#" count: 1 path: ../src/Composer/Downloader/PathDownloader.php - - - message: "#^Call to function in_array\\(\\) with arguments 20, non\\-empty\\-array\\ and true will always evaluate to true\\.$#" - count: 1 - path: ../src/Composer/Downloader/PathDownloader.php - - - - message: "#^Else branch is unreachable because previous condition is always true\\.$#" - count: 1 - path: ../src/Composer/Downloader/PathDownloader.php - - message: "#^Only booleans are allowed in an if condition, array\\\\|null given\\.$#" count: 1 @@ -2435,11 +2390,6 @@ parameters: count: 1 path: ../src/Composer/Downloader/PathDownloader.php - - - message: "#^Parameter \\#1 \\$originDir of method Symfony\\\\Component\\\\Filesystem\\\\Filesystem\\:\\:symlink\\(\\) expects string, string\\|false given\\.$#" - count: 1 - path: ../src/Composer/Downloader/PathDownloader.php - - message: "#^Parameter \\#1 \\$path of function realpath expects string, string\\|null given\\.$#" count: 3 @@ -2515,11 +2465,6 @@ parameters: count: 1 path: ../src/Composer/Downloader/PerforceDownloader.php - - - message: "#^Only booleans are allowed in a negated boolean, string\\|null given\\.$#" - count: 1 - path: ../src/Composer/Downloader/SvnDownloader.php - - message: "#^Parameter \\#1 \\$version1 of function version_compare expects string, string\\|null given\\.$#" count: 1 @@ -3330,14 +3275,9 @@ parameters: count: 1 path: ../src/Composer/Package/Archiver/ArchivableFilesFinder.php - - - message: "#^Parameter \\#1 \\$haystack of function strpos expects string, string\\|false given\\.$#" - count: 1 - path: ../src/Composer/Package/Archiver/ArchivableFilesFinder.php - - message: "#^Parameter \\#1 \\$path of method Composer\\\\Util\\\\Filesystem\\:\\:normalizePath\\(\\) expects string, string\\|false given\\.$#" - count: 2 + count: 1 path: ../src/Composer/Package/Archiver/ArchivableFilesFinder.php - @@ -3990,11 +3930,6 @@ parameters: count: 1 path: ../src/Composer/Repository/ArtifactRepository.php - - - message: "#^Parameter \\#1 \\$filename of function sha1_file expects string, string\\|false given\\.$#" - count: 1 - path: ../src/Composer/Repository/ArtifactRepository.php - - message: "#^Cannot access offset 'path' on array\\{scheme\\?\\: string, host\\?\\: string, port\\?\\: int, user\\?\\: string, pass\\?\\: string, path\\?\\: string, query\\?\\: string, fragment\\?\\: string\\}\\|false\\.$#" count: 1 @@ -4718,11 +4653,6 @@ parameters: count: 1 path: ../src/Composer/Repository/Vcs/GitLabDriver.php - - - message: "#^Only booleans are allowed in &&, string given on the left side\\.$#" - count: 2 - path: ../src/Composer/Repository/Vcs/GitLabDriver.php - - message: "#^Only booleans are allowed in &&, string\\|false given on the right side\\.$#" count: 1 @@ -4745,7 +4675,7 @@ parameters: - message: "#^Only booleans are allowed in an if condition, string given\\.$#" - count: 3 + count: 1 path: ../src/Composer/Repository/Vcs/GitLabDriver.php - @@ -5528,11 +5458,6 @@ parameters: count: 1 path: ../src/Composer/Util/HttpDownloader.php - - - message: "#^Binary operation \"\\.\" between non\\-empty\\-string and non\\-empty\\-array\\\\|non\\-empty\\-string results in an error\\.$#" - count: 1 - path: ../src/Composer/Util/HttpDownloader.php - - message: "#^Cannot call method abortRequest\\(\\) on Composer\\\\Util\\\\Http\\\\CurlDownloader\\|null\\.$#" count: 1