Fix a few type errors, update baseline (2170, 104)

main
Jordi Boggiano 2 years ago
parent e63e15aea8
commit bbf2e94579
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -3800,11 +3800,6 @@ parameters:
count: 1 count: 1
path: ../src/Composer/Platform/Runtime.php 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\\<string\\> something that's already array\\<string\\>\\.$#" message: "#^Casting to array\\<string\\> something that's already array\\<string\\>\\.$#"
count: 1 count: 1
@ -3945,11 +3940,6 @@ parameters:
count: 1 count: 1
path: ../src/Composer/Repository/ComposerRepository.php 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\\>\\|Composer\\\\Package\\\\BasePackage\\|null\\.$#" message: "#^Method Composer\\\\Repository\\\\ComposerRepository\\:\\:findPackage\\(\\) should return Composer\\\\Package\\\\BasePackage\\|null but returns array\\<Composer\\\\Package\\\\BasePackage\\>\\|Composer\\\\Package\\\\BasePackage\\|null\\.$#"
count: 2 count: 2
@ -4343,21 +4333,11 @@ parameters:
count: 1 count: 1
path: ../src/Composer/Repository/PlatformRepository.php 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\\.$#" message: "#^Parameter \\#2 \\$prettyVersion of method Composer\\\\Repository\\\\PlatformRepository\\:\\:addLibrary\\(\\) expects string, string\\|null given\\.$#"
count: 3 count: 3
path: ../src/Composer/Repository/PlatformRepository.php 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\\.$#" message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#"
count: 3 count: 3
@ -4483,16 +4463,6 @@ parameters:
count: 10 count: 10
path: ../src/Composer/Repository/Vcs/GitBitbucketDriver.php path: ../src/Composer/Repository/Vcs/GitBitbucketDriver.php
-
message: "#^Property Composer\\\\Repository\\\\Vcs\\\\GitBitbucketDriver\\:\\:\\$branches \\(array\\<string, string\\>\\) does not accept array\\<int\\|string, mixed\\>\\.$#"
count: 1
path: ../src/Composer/Repository/Vcs/GitBitbucketDriver.php
-
message: "#^Property Composer\\\\Repository\\\\Vcs\\\\GitBitbucketDriver\\:\\:\\$tags \\(array\\<string, string\\>\\) does not accept array\\<int\\|string, mixed\\>\\.$#"
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\\.$#" message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#"
count: 2 count: 2
@ -4618,11 +4588,6 @@ parameters:
count: 1 count: 1
path: ../src/Composer/Repository/Vcs/GitHubDriver.php path: ../src/Composer/Repository/Vcs/GitHubDriver.php
-
message: "#^Property Composer\\\\Repository\\\\Vcs\\\\GitHubDriver\\:\\:\\$tags \\(array\\<string, string\\>\\) does not accept array\\<int\\|string, mixed\\>\\.$#"
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\\.$#" message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#"
count: 2 count: 2
@ -4658,11 +4623,6 @@ parameters:
count: 1 count: 1
path: ../src/Composer/Repository/Vcs/GitLabDriver.php path: ../src/Composer/Repository/Vcs/GitLabDriver.php
-
message: "#^Only booleans are allowed in a negated boolean, array\\<string, string\\> 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\\.$#" message: "#^Only booleans are allowed in an if condition, Composer\\\\Repository\\\\Vcs\\\\GitDriver\\|null given\\.$#"
count: 8 count: 8
@ -4698,16 +4658,6 @@ parameters:
count: 1 count: 1
path: ../src/Composer/Repository/Vcs/HgDriver.php path: ../src/Composer/Repository/Vcs/HgDriver.php
-
message: "#^Property Composer\\\\Repository\\\\Vcs\\\\HgDriver\\:\\:\\$branches \\(array\\<string, string\\>\\) does not accept array\\<int\\|string, mixed\\>\\.$#"
count: 1
path: ../src/Composer/Repository/Vcs/HgDriver.php
-
message: "#^Property Composer\\\\Repository\\\\Vcs\\\\HgDriver\\:\\:\\$tags \\(array\\<string, string\\>\\) does not accept array\\<int\\|string, mixed\\>\\.$#"
count: 1
path: ../src/Composer/Repository/Vcs/HgDriver.php
- -
message: "#^Cannot call method checkStream\\(\\) on Composer\\\\Util\\\\Perforce\\|null\\.$#" message: "#^Cannot call method checkStream\\(\\) on Composer\\\\Util\\\\Perforce\\|null\\.$#"
count: 1 count: 1
@ -5738,11 +5688,6 @@ parameters:
count: 1 count: 1
path: ../src/Composer/Util/ProcessExecutor.php 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\\<int, array\\<string, mixed\\>\\>\\) does not accept array\\<int\\|string, array\\<string, mixed\\>\\>\\.$#" message: "#^Property Composer\\\\Util\\\\ProcessExecutor\\:\\:\\$jobs \\(array\\<int, array\\<string, mixed\\>\\>\\) does not accept array\\<int\\|string, array\\<string, mixed\\>\\>\\.$#"
count: 1 count: 1

@ -24,9 +24,9 @@ use Composer\IO\IOInterface;
*/ */
class FossilDriver extends VcsDriver class FossilDriver extends VcsDriver
{ {
/** @var array<string, string> Map of tag name to identifier */ /** @var array<int|string, string> Map of tag name to identifier */
protected $tags; protected $tags;
/** @var array<string, string> Map of branch name to identifier */ /** @var array<int|string, string> Map of branch name to identifier */
protected $branches; protected $branches;
/** @var ?string */ /** @var ?string */
protected $rootIdentifier = null; protected $rootIdentifier = null;

@ -34,9 +34,9 @@ class GitBitbucketDriver extends VcsDriver
private $hasIssues = false; private $hasIssues = false;
/** @var ?string */ /** @var ?string */
private $rootIdentifier; private $rootIdentifier;
/** @var array<string, string> Map of tag name to identifier */ /** @var array<int|string, string> Map of tag name to identifier */
private $tags; private $tags;
/** @var array<string, string> Map of branch name to identifier */ /** @var array<int|string, string> Map of branch name to identifier */
private $branches; private $branches;
/** @var string */ /** @var string */
private $branchesUrl = ''; private $branchesUrl = '';

@ -30,9 +30,9 @@ class GitHubDriver extends VcsDriver
protected $owner; protected $owner;
/** @var string */ /** @var string */
protected $repository; protected $repository;
/** @var array<string, string> Map of tag name to identifier */ /** @var array<int|string, string> Map of tag name to identifier */
protected $tags; protected $tags;
/** @var array<string, string> Map of branch name to identifier */ /** @var array<int|string, string> Map of branch name to identifier */
protected $branches; protected $branches;
/** @var string */ /** @var string */
protected $rootIdentifier; protected $rootIdentifier;

@ -50,10 +50,10 @@ class GitLabDriver extends VcsDriver
*/ */
private $commits = array(); private $commits = array();
/** @var array<string, string> Map of tag name to identifier */ /** @var array<int|string, string> Map of tag name to identifier */
private $tags; private $tags;
/** @var array<string, string> Map of branch name to identifier */ /** @var array<int|string, string> Map of branch name to identifier */
private $branches; private $branches;
/** /**
@ -300,7 +300,7 @@ class GitLabDriver extends VcsDriver
return $this->gitDriver->getBranches(); return $this->gitDriver->getBranches();
} }
if (!$this->branches) { if (null === $this->branches) {
$this->branches = $this->getReferences('branches'); $this->branches = $this->getReferences('branches');
} }
@ -316,7 +316,7 @@ class GitLabDriver extends VcsDriver
return $this->gitDriver->getTags(); return $this->gitDriver->getTags();
} }
if (!$this->tags) { if (null === $this->tags) {
$this->tags = $this->getReferences('tags'); $this->tags = $this->getReferences('tags');
} }

@ -25,9 +25,9 @@ use Composer\IO\IOInterface;
*/ */
class HgDriver extends VcsDriver class HgDriver extends VcsDriver
{ {
/** @var array<string, string> Map of tag name to identifier */ /** @var array<int|string, string> Map of tag name to identifier */
protected $tags; protected $tags;
/** @var array<string, string> Map of branch name to identifier */ /** @var array<int|string, string> Map of branch name to identifier */
protected $branches; protected $branches;
/** @var string */ /** @var string */
protected $rootIdentifier; protected $rootIdentifier;

@ -31,9 +31,9 @@ class SvnDriver extends VcsDriver
{ {
/** @var string */ /** @var string */
protected $baseUrl; protected $baseUrl;
/** @var array<string, string> Map of tag name to identifier */ /** @var array<int|string, string> Map of tag name to identifier */
protected $tags; protected $tags;
/** @var array<string, string> Map of branch name to identifier */ /** @var array<int|string, string> Map of branch name to identifier */
protected $branches; protected $branches;
/** @var ?string */ /** @var ?string */
protected $rootIdentifier; protected $rootIdentifier;

@ -44,7 +44,7 @@ abstract class VcsDriver implements VcsDriverInterface
protected $process; protected $process;
/** @var HttpDownloader */ /** @var HttpDownloader */
protected $httpDownloader; protected $httpDownloader;
/** @var array<string, mixed> */ /** @var array<int|string, mixed> */
protected $infoCache = array(); protected $infoCache = array();
/** @var ?Cache */ /** @var ?Cache */
protected $cache; protected $cache;

Loading…
Cancel
Save