1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 09:02:59 +00:00

Bump phpstan to level 3 (#9734)

Clean up PackageInterface/CompletePackageInterface, add missing methods, type things in solver as BasePackage, added CompleteAliasPackage, ..
This commit is contained in:
Jordi Boggiano 2021-03-09 15:49:40 +01:00 committed by GitHub
parent 8392508e23
commit 4940009f83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
98 changed files with 1007 additions and 572 deletions

View file

@ -13,7 +13,7 @@
namespace Composer\DependencyResolver;
use Composer\Package\Link;
use Composer\Package\PackageInterface;
use Composer\Package\BasePackage;
use Composer\Package\AliasPackage;
use Composer\Repository\RepositorySet;
use Composer\Repository\PlatformRepository;
@ -46,8 +46,8 @@ abstract class Rule
protected $reasonData;
/**
* @param int $reason A RULE_* constant describing the reason for generating this rule
* @param Link|PackageInterface $reasonData
* @param int $reason A RULE_* constant describing the reason for generating this rule
* @param Link|BasePackage $reasonData
*/
public function __construct($reason, $reasonData)
{
@ -62,6 +62,8 @@ abstract class Rule
abstract public function getHash();
abstract public function __toString();
abstract public function equals(Rule $rule);
public function getReason()
@ -361,7 +363,7 @@ abstract class Rule
return Problem::getPackageList($packages, $isVerbose);
}
private function deduplicateDefaultBranchAlias(PackageInterface $package)
private function deduplicateDefaultBranchAlias(BasePackage $package)
{
if ($package instanceof AliasPackage && $package->getPrettyVersion() === VersionParser::DEFAULT_BRANCH_ALIAS) {
$package = $package->getAliasOf();