diff --git a/phpstan/baseline.neon b/phpstan/baseline.neon index 75f0c68e9..3ac6db9da 100644 --- a/phpstan/baseline.neon +++ b/phpstan/baseline.neon @@ -3800,11 +3800,6 @@ parameters: count: 1 path: ../src/Composer/Platform/Runtime.php - - - message: "#^Method Composer\\\\Platform\\\\Runtime\\:\\:getExtensionVersion\\(\\) should return string but returns string\\|false\\.$#" - count: 1 - path: ../src/Composer/Platform/Runtime.php - - message: "#^Casting to array\\ something that's already array\\\\.$#" count: 1 @@ -3945,11 +3940,6 @@ parameters: count: 1 path: ../src/Composer/Repository/ComposerRepository.php - - - message: "#^Method Composer\\\\Repository\\\\ComposerRepository\\:\\:findPackage\\(\\) should return Composer\\\\Package\\\\BasePackage\\|null but returns Composer\\\\Package\\\\BasePackage\\|false\\.$#" - count: 1 - path: ../src/Composer/Repository/ComposerRepository.php - - message: "#^Method Composer\\\\Repository\\\\ComposerRepository\\:\\:findPackage\\(\\) should return Composer\\\\Package\\\\BasePackage\\|null but returns array\\\\|Composer\\\\Package\\\\BasePackage\\|null\\.$#" count: 2 @@ -4343,21 +4333,11 @@ parameters: count: 1 path: ../src/Composer/Repository/PlatformRepository.php - - - message: "#^Parameter \\#1 \\$version of method Composer\\\\Semver\\\\VersionParser\\:\\:normalize\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: ../src/Composer/Repository/PlatformRepository.php - - message: "#^Parameter \\#2 \\$prettyVersion of method Composer\\\\Repository\\\\PlatformRepository\\:\\:addLibrary\\(\\) expects string, string\\|null given\\.$#" count: 3 path: ../src/Composer/Repository/PlatformRepository.php - - - message: "#^Parameter \\#2 \\$subject of static method Composer\\\\Pcre\\\\Preg\\:\\:isMatch\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: ../src/Composer/Repository/PlatformRepository.php - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" count: 3 @@ -4483,16 +4463,6 @@ parameters: count: 10 path: ../src/Composer/Repository/Vcs/GitBitbucketDriver.php - - - message: "#^Property Composer\\\\Repository\\\\Vcs\\\\GitBitbucketDriver\\:\\:\\$branches \\(array\\\\) does not accept array\\\\.$#" - count: 1 - path: ../src/Composer/Repository/Vcs/GitBitbucketDriver.php - - - - message: "#^Property Composer\\\\Repository\\\\Vcs\\\\GitBitbucketDriver\\:\\:\\$tags \\(array\\\\) does not accept array\\\\.$#" - count: 1 - path: ../src/Composer/Repository/Vcs/GitBitbucketDriver.php - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" count: 2 @@ -4618,11 +4588,6 @@ parameters: count: 1 path: ../src/Composer/Repository/Vcs/GitHubDriver.php - - - message: "#^Property Composer\\\\Repository\\\\Vcs\\\\GitHubDriver\\:\\:\\$tags \\(array\\\\) does not accept array\\\\.$#" - count: 1 - path: ../src/Composer/Repository/Vcs/GitHubDriver.php - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" count: 2 @@ -4658,11 +4623,6 @@ parameters: count: 1 path: ../src/Composer/Repository/Vcs/GitLabDriver.php - - - message: "#^Only booleans are allowed in a negated boolean, array\\ given\\.$#" - count: 2 - path: ../src/Composer/Repository/Vcs/GitLabDriver.php - - message: "#^Only booleans are allowed in an if condition, Composer\\\\Repository\\\\Vcs\\\\GitDriver\\|null given\\.$#" count: 8 @@ -4698,16 +4658,6 @@ parameters: count: 1 path: ../src/Composer/Repository/Vcs/HgDriver.php - - - message: "#^Property Composer\\\\Repository\\\\Vcs\\\\HgDriver\\:\\:\\$branches \\(array\\\\) does not accept array\\\\.$#" - count: 1 - path: ../src/Composer/Repository/Vcs/HgDriver.php - - - - message: "#^Property Composer\\\\Repository\\\\Vcs\\\\HgDriver\\:\\:\\$tags \\(array\\\\) does not accept array\\\\.$#" - count: 1 - path: ../src/Composer/Repository/Vcs/HgDriver.php - - message: "#^Cannot call method checkStream\\(\\) on Composer\\\\Util\\\\Perforce\\|null\\.$#" count: 1 @@ -5738,11 +5688,6 @@ parameters: count: 1 path: ../src/Composer/Util/ProcessExecutor.php - - - message: "#^Only booleans are allowed in a negated boolean, int given\\.$#" - count: 1 - path: ../src/Composer/Util/ProcessExecutor.php - - message: "#^Property Composer\\\\Util\\\\ProcessExecutor\\:\\:\\$jobs \\(array\\\\>\\) does not accept array\\\\>\\.$#" count: 1 diff --git a/src/Composer/Repository/Vcs/FossilDriver.php b/src/Composer/Repository/Vcs/FossilDriver.php index b8b342905..86ee0307b 100644 --- a/src/Composer/Repository/Vcs/FossilDriver.php +++ b/src/Composer/Repository/Vcs/FossilDriver.php @@ -24,9 +24,9 @@ use Composer\IO\IOInterface; */ class FossilDriver extends VcsDriver { - /** @var array Map of tag name to identifier */ + /** @var array Map of tag name to identifier */ protected $tags; - /** @var array Map of branch name to identifier */ + /** @var array Map of branch name to identifier */ protected $branches; /** @var ?string */ protected $rootIdentifier = null; diff --git a/src/Composer/Repository/Vcs/GitBitbucketDriver.php b/src/Composer/Repository/Vcs/GitBitbucketDriver.php index 33bee56eb..30f35235f 100644 --- a/src/Composer/Repository/Vcs/GitBitbucketDriver.php +++ b/src/Composer/Repository/Vcs/GitBitbucketDriver.php @@ -34,9 +34,9 @@ class GitBitbucketDriver extends VcsDriver private $hasIssues = false; /** @var ?string */ private $rootIdentifier; - /** @var array Map of tag name to identifier */ + /** @var array Map of tag name to identifier */ private $tags; - /** @var array Map of branch name to identifier */ + /** @var array Map of branch name to identifier */ private $branches; /** @var string */ private $branchesUrl = ''; diff --git a/src/Composer/Repository/Vcs/GitHubDriver.php b/src/Composer/Repository/Vcs/GitHubDriver.php index ad05de78a..6e81bc584 100644 --- a/src/Composer/Repository/Vcs/GitHubDriver.php +++ b/src/Composer/Repository/Vcs/GitHubDriver.php @@ -30,9 +30,9 @@ class GitHubDriver extends VcsDriver protected $owner; /** @var string */ protected $repository; - /** @var array Map of tag name to identifier */ + /** @var array Map of tag name to identifier */ protected $tags; - /** @var array Map of branch name to identifier */ + /** @var array Map of branch name to identifier */ protected $branches; /** @var string */ protected $rootIdentifier; diff --git a/src/Composer/Repository/Vcs/GitLabDriver.php b/src/Composer/Repository/Vcs/GitLabDriver.php index bb4db239c..47dee5e4a 100644 --- a/src/Composer/Repository/Vcs/GitLabDriver.php +++ b/src/Composer/Repository/Vcs/GitLabDriver.php @@ -50,10 +50,10 @@ class GitLabDriver extends VcsDriver */ private $commits = array(); - /** @var array Map of tag name to identifier */ + /** @var array Map of tag name to identifier */ private $tags; - /** @var array Map of branch name to identifier */ + /** @var array Map of branch name to identifier */ private $branches; /** @@ -300,7 +300,7 @@ class GitLabDriver extends VcsDriver return $this->gitDriver->getBranches(); } - if (!$this->branches) { + if (null === $this->branches) { $this->branches = $this->getReferences('branches'); } @@ -316,7 +316,7 @@ class GitLabDriver extends VcsDriver return $this->gitDriver->getTags(); } - if (!$this->tags) { + if (null === $this->tags) { $this->tags = $this->getReferences('tags'); } diff --git a/src/Composer/Repository/Vcs/HgDriver.php b/src/Composer/Repository/Vcs/HgDriver.php index 70f69cbb3..4cc9e8d1e 100644 --- a/src/Composer/Repository/Vcs/HgDriver.php +++ b/src/Composer/Repository/Vcs/HgDriver.php @@ -25,9 +25,9 @@ use Composer\IO\IOInterface; */ class HgDriver extends VcsDriver { - /** @var array Map of tag name to identifier */ + /** @var array Map of tag name to identifier */ protected $tags; - /** @var array Map of branch name to identifier */ + /** @var array Map of branch name to identifier */ protected $branches; /** @var string */ protected $rootIdentifier; diff --git a/src/Composer/Repository/Vcs/SvnDriver.php b/src/Composer/Repository/Vcs/SvnDriver.php index b4c4064a5..ce7bdfe0f 100644 --- a/src/Composer/Repository/Vcs/SvnDriver.php +++ b/src/Composer/Repository/Vcs/SvnDriver.php @@ -31,9 +31,9 @@ class SvnDriver extends VcsDriver { /** @var string */ protected $baseUrl; - /** @var array Map of tag name to identifier */ + /** @var array Map of tag name to identifier */ protected $tags; - /** @var array Map of branch name to identifier */ + /** @var array Map of branch name to identifier */ protected $branches; /** @var ?string */ protected $rootIdentifier; diff --git a/src/Composer/Repository/Vcs/VcsDriver.php b/src/Composer/Repository/Vcs/VcsDriver.php index f0c3af1ca..484082de0 100644 --- a/src/Composer/Repository/Vcs/VcsDriver.php +++ b/src/Composer/Repository/Vcs/VcsDriver.php @@ -44,7 +44,7 @@ abstract class VcsDriver implements VcsDriverInterface protected $process; /** @var HttpDownloader */ protected $httpDownloader; - /** @var array */ + /** @var array */ protected $infoCache = array(); /** @var ?Cache */ protected $cache;