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:
parent
8392508e23
commit
4940009f83
98 changed files with 1007 additions and 572 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue