Browse Source

Merge pull request #11629 from carusogabriel/simplify-returns

Simplify returns
Mark Story 8 years ago
parent
commit
308183b37d
1 changed files with 1 additions and 5 deletions
  1. 1 5
      src/Event/Decorator/ConditionDecorator.php

+ 1 - 5
src/Event/Decorator/ConditionDecorator.php

@@ -63,11 +63,7 @@ class ConditionDecorator extends AbstractDecorator
     protected function _evaluateCondition($condition, Event $event)
     {
         if (!isset($this->_options[$condition])) {
-            if ($condition === 'unless') {
-                return false;
-            }
-
-            return true;
+            return $condition !== 'unless';
         }
         if (!is_callable($this->_options[$condition])) {
             throw new RuntimeException(self::class . ' the `' . $condition . '` condition is not a callable!');