From 1d51f349574bf166be127a14d0eab14aab2148b8 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 7 Jun 2023 08:50:57 +0200 Subject: [PATCH] Update baseline (1700, 94) --- phpstan/baseline.neon | 25 +++++----------------- src/Composer/Downloader/FileDownloader.php | 1 - 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/phpstan/baseline.neon b/phpstan/baseline.neon index 11534f149..3c445f08e 100644 --- a/phpstan/baseline.neon +++ b/phpstan/baseline.neon @@ -65,11 +65,6 @@ parameters: count: 5 path: ../src/Composer/Autoload/AutoloadGenerator.php - - - message: "#^Parameter \\#1 \\$packageMap of method Composer\\\\Autoload\\\\AutoloadGenerator\\:\\:parseAutoloadsType\\(\\) expects array\\, non\\-empty\\-array\\ given\\.$#" - count: 5 - path: ../src/Composer/Autoload/AutoloadGenerator.php - - message: "#^Parameter \\#1 \\$path of function realpath expects string, string\\|false given\\.$#" count: 2 @@ -1425,11 +1420,6 @@ parameters: count: 2 path: ../src/Composer/DependencyResolver/Solver.php - - - message: "#^Method Composer\\\\DependencyResolver\\\\Solver\\:\\:enableDisableLearnedRules\\(\\) is unused\\.$#" - count: 1 - path: ../src/Composer/DependencyResolver/Solver.php - - message: "#^Only booleans are allowed in &&, Composer\\\\DependencyResolver\\\\Rule\\|null given on the left side\\.$#" count: 1 @@ -1645,6 +1635,11 @@ parameters: count: 1 path: ../src/Composer/Downloader/FileDownloader.php + - + message: "#^Method Composer\\\\Downloader\\\\FileDownloader\\:\\:getDistPath\\(\\) should return string but returns array\\\\|string\\.$#" + count: 1 + path: ../src/Composer/Downloader/FileDownloader.php + - message: "#^Only booleans are allowed in &&, Composer\\\\Cache\\|null given on the left side\\.$#" count: 4 @@ -1695,11 +1690,6 @@ parameters: count: 1 path: ../src/Composer/Downloader/FileDownloader.php - - - message: "#^Parameter \\#1 \\$path of function pathinfo expects string, string\\|false\\|null given\\.$#" - count: 2 - 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: 3 @@ -3345,11 +3335,6 @@ parameters: count: 3 path: ../src/Composer/Repository/FilesystemRepository.php - - - message: "#^Strict comparison using \\!\\=\\= between null and non\\-empty\\-string will always evaluate to true\\.$#" - count: 1 - path: ../src/Composer/Repository/FilesystemRepository.php - - message: "#^Only booleans are allowed in &&, string\\|null given on the left side\\.$#" count: 1 diff --git a/src/Composer/Downloader/FileDownloader.php b/src/Composer/Downloader/FileDownloader.php index 49baa6321..fa6dfa73b 100644 --- a/src/Composer/Downloader/FileDownloader.php +++ b/src/Composer/Downloader/FileDownloader.php @@ -370,7 +370,6 @@ class FileDownloader implements DownloaderInterface, ChangeReportInterface protected function getDistPath(PackageInterface $package, int $component): string { - // @phpstan-ignore-next-line return pathinfo((string) parse_url(strtr((string) $package->getDistUrl(), '\\', '/'), PHP_URL_PATH), $component); }