1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Add return types to private/internal methods

This commit is contained in:
Jordi Boggiano 2022-02-18 11:22:01 +01:00
parent abdc6893a6
commit a16ed3d0ed
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
134 changed files with 365 additions and 359 deletions

View file

@ -232,7 +232,7 @@ abstract class Rule
* @internal
* @return BasePackage
*/
public function getSourcePackage(Pool $pool)
public function getSourcePackage(Pool $pool): BasePackage
{
$literals = $this->getLiterals();
@ -498,7 +498,7 @@ abstract class Rule
/**
* @return BasePackage
*/
private function deduplicateDefaultBranchAlias(BasePackage $package)
private function deduplicateDefaultBranchAlias(BasePackage $package): BasePackage
{
if ($package instanceof AliasPackage && $package->getPrettyVersion() === VersionParser::DEFAULT_BRANCH_ALIAS) {
$package = $package->getAliasOf();