From 203ec4b485e43f77a9aa8e5064e72d1c67f96543 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 8 Jun 2022 15:07:38 +0200 Subject: [PATCH] Update baseline (1947, 103) --- phpstan/baseline-8.1.neon | 5 - phpstan/baseline.neon | 230 +------------------------------------- 2 files changed, 5 insertions(+), 230 deletions(-) diff --git a/phpstan/baseline-8.1.neon b/phpstan/baseline-8.1.neon index 72a234af4..12bfc559b 100644 --- a/phpstan/baseline-8.1.neon +++ b/phpstan/baseline-8.1.neon @@ -245,11 +245,6 @@ parameters: count: 1 path: ../src/Composer/Util/Http/CurlDownloader.php - - - message: "#^Parameter \\#1 \\$string of function strtolower expects string, string\\|null given\\.$#" - count: 1 - path: ../src/Composer/Util/Http/CurlDownloader.php - - message: "#^Parameter \\#2 \\$handle of function curl_multi_remove_handle expects CurlHandle, resource given\\.$#" count: 1 diff --git a/phpstan/baseline.neon b/phpstan/baseline.neon index 9e8614240..97429dd89 100644 --- a/phpstan/baseline.neon +++ b/phpstan/baseline.neon @@ -435,11 +435,6 @@ parameters: count: 1 path: ../src/Composer/Command/CreateProjectCommand.php - - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" - count: 3 - path: ../src/Composer/Command/CreateProjectCommand.php - - message: "#^Variable method call on Composer\\\\Package\\\\RootPackageInterface\\.$#" count: 1 @@ -545,11 +540,6 @@ parameters: count: 3 path: ../src/Composer/Command/DiagnoseCommand.php - - - message: "#^Only booleans are allowed in a negated boolean, array\\ given\\.$#" - count: 1 - path: ../src/Composer/Command/ExecCommand.php - - message: "#^Parameter \\#1 \\$arr1 of function array_merge expects array, array\\\\|false given\\.$#" count: 1 @@ -617,7 +607,7 @@ parameters: - message: "#^Cannot call method getRepoName\\(\\) on Composer\\\\Repository\\\\RepositoryInterface\\|null\\.$#" - count: 4 + count: 2 path: ../src/Composer/Command/InitCommand.php - @@ -682,7 +672,7 @@ parameters: - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" - count: 8 + count: 7 path: ../src/Composer/Command/InitCommand.php - @@ -710,11 +700,6 @@ parameters: count: 1 path: ../src/Composer/Command/RemoveCommand.php - - - message: "#^Offset 'require'\\|'require\\-dev' does not exist on array\\{require\\?\\: array\\, require\\-dev\\?\\: array\\\\}\\.$#" - count: 8 - path: ../src/Composer/Command/RemoveCommand.php - - message: "#^Only booleans are allowed in an if condition, Composer\\\\Composer\\|null given\\.$#" count: 1 @@ -727,7 +712,7 @@ parameters: - message: "#^Cannot call method getRepoName\\(\\) on Composer\\\\Repository\\\\RepositoryInterface\\|null\\.$#" - count: 4 + count: 2 path: ../src/Composer/Command/RequireCommand.php - @@ -780,11 +765,6 @@ parameters: count: 1 path: ../src/Composer/Command/RequireCommand.php - - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" - count: 1 - path: ../src/Composer/Command/RequireCommand.php - - message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#" count: 1 @@ -1122,7 +1102,7 @@ parameters: - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" - count: 10 + count: 9 path: ../src/Composer/Command/ShowCommand.php - @@ -1205,11 +1185,6 @@ parameters: count: 2 path: ../src/Composer/Command/SuggestsCommand.php - - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" - count: 1 - path: ../src/Composer/Command/SuggestsCommand.php - - message: "#^Call to function array_search\\(\\) requires parameter \\#3 to be set\\.$#" count: 1 @@ -1750,11 +1725,6 @@ parameters: count: 1 path: ../src/Composer/DependencyResolver/RuleSetGenerator.php - - - message: "#^Only booleans are allowed in a negated boolean, int\\<0, max\\> given\\.$#" - count: 2 - path: ../src/Composer/DependencyResolver/RuleSetIterator.php - - message: "#^Return type \\(\\-1\\|0\\|1\\|4\\) of method Composer\\\\DependencyResolver\\\\RuleSetIterator\\:\\:key\\(\\) should be covariant with return type \\(0\\|1\\|4\\) of method Iterator\\\\:\\:key\\(\\)$#" count: 1 @@ -2530,11 +2500,6 @@ parameters: count: 1 path: ../src/Composer/IO/BaseIO.php - - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" - count: 6 - path: ../src/Composer/IO/BaseIO.php - - message: "#^Instanceof between Symfony\\\\Component\\\\Console\\\\Input\\\\StringInput and Symfony\\\\Component\\\\Console\\\\Input\\\\StreamableInputInterface will always evaluate to true\\.$#" count: 1 @@ -4033,23 +3998,8 @@ parameters: count: 1 path: ../src/Composer/Repository/RepositoryFactory.php - - - message: "#^Only booleans are allowed in a negated boolean, Composer\\\\Config\\|null given\\.$#" - count: 1 - path: ../src/Composer/Repository/RepositoryFactory.php - - - - message: "#^Only booleans are allowed in a negated boolean, Composer\\\\IO\\\\IOInterface\\|null given\\.$#" - count: 1 - path: ../src/Composer/Repository/RepositoryFactory.php - - message: "#^Only booleans are allowed in a negated boolean, Composer\\\\Repository\\\\RepositoryManager\\|null given\\.$#" - count: 2 - path: ../src/Composer/Repository/RepositoryFactory.php - - - - message: "#^Only booleans are allowed in an if condition, Composer\\\\IO\\\\IOInterface\\|null given\\.$#" count: 1 path: ../src/Composer/Repository/RepositoryFactory.php @@ -4785,7 +4735,7 @@ parameters: - message: "#^Call to function is_resource\\(\\) with resource will always evaluate to true\\.$#" - count: 3 + count: 2 path: ../src/Composer/Util/Http/CurlDownloader.php - @@ -4903,11 +4853,6 @@ parameters: count: 1 path: ../src/Composer/Util/Http/CurlDownloader.php - - - message: "#^Parameter \\#1 \\$str of function strtolower expects string, string\\|null given\\.$#" - count: 1 - path: ../src/Composer/Util/Http/CurlDownloader.php - - message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|null given\\.$#" count: 1 @@ -5073,21 +5018,6 @@ parameters: count: 1 path: ../src/Composer/Util/HttpDownloader.php - - - message: "#^Offset 'info'\\|'warning' does not exist on array\\{warning\\?\\: string, info\\?\\: string, warning\\-versions\\?\\: string, info\\-versions\\?\\: string, warnings\\?\\: array\\, infos\\?\\: array\\\\}\\.$#" - count: 1 - path: ../src/Composer/Util/HttpDownloader.php - - - - message: "#^Offset 'info\\-versions'\\|'warning\\-versions' does not exist on array\\{warning\\?\\: string, info\\?\\: string, warning\\-versions\\?\\: string, info\\-versions\\?\\: string, warnings\\?\\: array\\, infos\\?\\: array\\\\}\\.$#" - count: 1 - path: ../src/Composer/Util/HttpDownloader.php - - - - message: "#^Offset 'infos'\\|'warnings' does not exist on array\\{warning\\?\\: string, info\\?\\: string, warning\\-versions\\?\\: string, info\\-versions\\?\\: string, warnings\\?\\: array\\, infos\\?\\: array\\\\}\\.$#" - count: 1 - path: ../src/Composer/Util/HttpDownloader.php - - message: "#^Offset 'options' does not exist on array\\{url\\: string, options\\?\\: array, copyTo\\?\\: string\\|null\\}\\.$#" count: 3 @@ -5658,11 +5588,6 @@ parameters: count: 1 path: ../tests/Composer/Test/Autoload/AutoloadGeneratorTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Autoload/AutoloadGeneratorTest.php - - message: "#^Only booleans are allowed in an if condition, array\\ given\\.$#" count: 2 @@ -5678,11 +5603,6 @@ parameters: count: 1 path: ../tests/Composer/Test/Autoload/ClassMapGeneratorTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 2 - path: ../tests/Composer/Test/Autoload/ClassMapGeneratorTest.php - - message: "#^Parameter \\#1 \\$expected of method Composer\\\\Test\\\\Autoload\\\\ClassMapGeneratorTest\\:\\:assertEqualsNormalized\\(\\) expects array\\, array\\ given\\.$#" count: 3 @@ -5693,21 +5613,6 @@ parameters: count: 3 path: ../tests/Composer/Test/Autoload/ClassMapGeneratorTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/CacheTest.php - - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Command/RunScriptCommandTest.php - - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Config/JsonConfigSourceTest.php - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" count: 1 @@ -5838,31 +5743,16 @@ parameters: count: 1 path: ../tests/Composer/Test/Downloader/DownloadManagerTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 6 - path: ../tests/Composer/Test/Downloader/FileDownloaderTest.php - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" count: 3 path: ../tests/Composer/Test/Downloader/FileDownloaderTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Downloader/FossilDownloaderTest.php - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" count: 4 path: ../tests/Composer/Test/Downloader/FossilDownloaderTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Downloader/GitDownloaderTest.php - - message: "#^Only booleans are allowed in a negated boolean, Composer\\\\Config\\|null given\\.$#" count: 1 @@ -5873,31 +5763,11 @@ parameters: count: 3 path: ../tests/Composer/Test/Downloader/GitDownloaderTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Downloader/HgDownloaderTest.php - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" count: 4 path: ../tests/Composer/Test/Downloader/HgDownloaderTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Downloader/PerforceDownloaderTest.php - - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Downloader/XzDownloaderTest.php - - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Downloader/ZipDownloaderTest.php - - message: "#^Only booleans are allowed in a negated boolean, string\\|false given\\.$#" count: 2 @@ -5926,11 +5796,6 @@ parameters: count: 1 path: ../tests/Composer/Test/InstalledVersionsTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/InstalledVersionsTest.php - - message: "#^Parameter \\#1 \\$path of function realpath expects string, string\\|null given\\.$#" count: 1 @@ -5946,11 +5811,6 @@ parameters: count: 3 path: ../tests/Composer/Test/Installer/BinaryInstallerTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Installer/BinaryInstallerTest.php - - message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'Composer\\\\\\\\Composer' and Composer\\\\Composer will always evaluate to true\\.$#" count: 1 @@ -5961,11 +5821,6 @@ parameters: count: 1 path: ../tests/Composer/Test/Installer/InstallerEventTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Installer/LibraryInstallerTest.php - - message: "#^Call to function is_array\\(\\) with array\\ will always evaluate to true\\.$#" count: 1 @@ -6091,11 +5946,6 @@ parameters: count: 1 path: ../tests/Composer/Test/Mock/VersionGuesserMock.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php - - message: "#^Dynamic call to static method Composer\\\\Factory\\:\\:createConfig\\(\\)\\.$#" count: 1 @@ -6106,16 +5956,6 @@ parameters: count: 1 path: ../tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Package/Archiver/ArchiverTest.php - - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 2 - path: ../tests/Composer/Test/Package/Archiver/PharArchiverTest.php - - message: "#^Parameter \\#1 \\$sources of method Composer\\\\Package\\\\Archiver\\\\PharArchiver\\:\\:archive\\(\\) expects string, string\\|null given\\.$#" count: 2 @@ -6211,11 +6051,6 @@ parameters: count: 1 path: ../tests/Composer/Test/Plugin/PluginInstallerTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Plugin/PluginInstallerTest.php - - message: "#^Parameter \\#2 \\$capabilityClassName of method Composer\\\\Plugin\\\\PluginManager\\:\\:getPluginCapability\\(\\) expects class\\-string\\, string given\\.$#" count: 2 @@ -6256,11 +6091,6 @@ parameters: count: 1 path: ../tests/Composer/Test/Repository/CompositeRepositoryTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Repository/FilesystemRepositoryTest.php - - message: "#^Parameter \\#1 \\$path of function realpath expects string, string\\|false given\\.$#" count: 2 @@ -6281,26 +6111,6 @@ parameters: count: 1 path: ../tests/Composer/Test/Repository/RepositoryManagerTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Repository/RepositoryManagerTest.php - - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Repository/Vcs/FossilDriverTest.php - - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php - - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php - - message: "#^Offset 'reference' does not exist on array\\{type\\: string, url\\: string, reference\\: string, shasum\\: string\\}\\|null\\.$#" count: 4 @@ -6321,36 +6131,11 @@ parameters: count: 1 path: ../tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php - - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Repository/Vcs/HgDriverTest.php - - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php - - message: "#^Parameter \\#1 \\$repoConfig of class Composer\\\\Repository\\\\Vcs\\\\PerforceDriver constructor expects array\\{url\\: string\\}, array\\ given\\.$#" count: 1 path: ../tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 1 - path: ../tests/Composer/Test/Repository/Vcs/SvnDriverTest.php - - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 2 - path: ../tests/Composer/Test/Repository/VcsRepositoryTest.php - - message: "#^Only booleans are allowed in a negated boolean, string given\\.$#" count: 1 @@ -6386,11 +6171,6 @@ parameters: count: 1 path: ../tests/Composer/Test/TestCase.php - - - message: "#^Dynamic call to static method Composer\\\\Test\\\\TestCase\\:\\:getUniqueTmpDirectory\\(\\)\\.$#" - count: 2 - path: ../tests/Composer/Test/Util/FilesystemTest.php - - message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'Composer\\\\\\\\Util\\\\\\\\Http…' and Composer\\\\Util\\\\Http\\\\ProxyManager will always evaluate to true\\.$#" count: 1