1
0
Fork 0

Fix phpstan

pull/10372/head
Jordi Boggiano 2021-12-19 16:12:22 +01:00
parent d81298239b
commit 95e41ae61c
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 0 deletions

View File

@ -309,6 +309,8 @@ abstract class Rule
$conflictTarget = $package1->getPrettyString(); $conflictTarget = $package1->getPrettyString();
if ($reasonData = $this->getReasonData()) { if ($reasonData = $this->getReasonData()) {
assert($reasonData instanceof Link);
// swap literals if they are not in the right order with package2 being the conflicter // swap literals if they are not in the right order with package2 being the conflicter
if ($reasonData->getSource() === $package1->getName()) { if ($reasonData->getSource() === $package1->getName()) {
list($package2, $package1) = array($package1, $package2); list($package2, $package1) = array($package1, $package2);