1
0
Fork 0

Remove unused RULE_INTERNAL_ALLOW_UPDATE

pull/8937/head
Jordi Boggiano 2020-06-02 11:22:35 +02:00
parent c8efb50d39
commit 5e5f9f8142
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
3 changed files with 2 additions and 6 deletions

View File

@ -28,7 +28,6 @@ use Composer\Semver\Constraint\Constraint;
abstract class Rule abstract class Rule
{ {
// reason constants // reason constants
const RULE_INTERNAL_ALLOW_UPDATE = 1;
const RULE_ROOT_REQUIRE = 2; const RULE_ROOT_REQUIRE = 2;
const RULE_FIXED = 3; const RULE_FIXED = 3;
const RULE_PACKAGE_CONFLICT = 6; const RULE_PACKAGE_CONFLICT = 6;
@ -180,9 +179,6 @@ abstract class Rule
} }
switch ($this->getReason()) { switch ($this->getReason()) {
case self::RULE_INTERNAL_ALLOW_UPDATE:
return $ruleText;
case self::RULE_ROOT_REQUIRE: case self::RULE_ROOT_REQUIRE:
$packageName = $this->reasonData['packageName']; $packageName = $this->reasonData['packageName'];
$constraint = $this->reasonData['constraint']; $constraint = $this->reasonData['constraint'];

View File

@ -35,7 +35,7 @@ class RuleSetIteratorTest extends TestCase
new GenericRule(array(), Rule::RULE_ROOT_REQUIRE, null), new GenericRule(array(), Rule::RULE_ROOT_REQUIRE, null),
), ),
RuleSet::TYPE_LEARNED => array( RuleSet::TYPE_LEARNED => array(
new GenericRule(array(), Rule::RULE_INTERNAL_ALLOW_UPDATE, null), new GenericRule(array(), Rule::RULE_FIXED, null),
), ),
RuleSet::TYPE_PACKAGE => array(), RuleSet::TYPE_PACKAGE => array(),
); );

View File

@ -31,7 +31,7 @@ class RuleSetTest extends TestCase
new GenericRule(array(2), Rule::RULE_ROOT_REQUIRE, null), new GenericRule(array(2), Rule::RULE_ROOT_REQUIRE, null),
), ),
RuleSet::TYPE_LEARNED => array( RuleSet::TYPE_LEARNED => array(
new GenericRule(array(), Rule::RULE_INTERNAL_ALLOW_UPDATE, null), new GenericRule(array(), Rule::RULE_FIXED, null),
), ),
); );