From 4263fe92551f37e21dbf3fc8f5cc8c216b7f505e Mon Sep 17 00:00:00 2001 From: Adrien Brault Date: Sun, 15 Jul 2012 17:31:03 +0300 Subject: [PATCH] Fix Solver CS --- src/Composer/DependencyResolver/Solver.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/Composer/DependencyResolver/Solver.php b/src/Composer/DependencyResolver/Solver.php index 1b6f9ef3d..0013548c8 100644 --- a/src/Composer/DependencyResolver/Solver.php +++ b/src/Composer/DependencyResolver/Solver.php @@ -524,12 +524,14 @@ class Solver if (!$job) { $why->disable(); - } else { - // disable all rules of this job - foreach ($this->rules as $rule) { - if ($job === $rule->getJob()) { - $rule->disable(); - } + + return; + } + + // disable all rules of this job + foreach ($this->rules as $rule) { + if ($job === $rule->getJob()) { + $rule->disable(); } } } @@ -600,12 +602,12 @@ class Solver if (1 === $level) { $conflictRule = $this->propagate($level); - if ($conflictRule !== null) { + if (null !== $conflictRule) { if ($this->analyzeUnsolvable($conflictRule, $disableRules)) { continue; - } else { - return; } + + return; } }