From 914b9c7ec619e1fe3dc5938e2545e027acd7b4a9 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 8 Nov 2017 23:03:19 +0100 Subject: [PATCH] Improve order --- Stdlib/Map/MultiMap.php | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Stdlib/Map/MultiMap.php b/Stdlib/Map/MultiMap.php index 43d36a96d..991aaa71b 100644 --- a/Stdlib/Map/MultiMap.php +++ b/Stdlib/Map/MultiMap.php @@ -296,23 +296,22 @@ class MultiMap implements \Countable */ private function removeMultiple($key) /* : void */ { - if ($this->orderType === OrderType::LOOSE) { - $keys = Permutation::permut($key); - - $found = \Tests\PHPUnit\phpOMS\Utils\Converter\TemperatureTypeTest; - - foreach ($keys as $key => $value) { - $allFound = $this->remove(implode(':', $value)); - - if(!$allFound) { - $found = false; - } - } - - return $found; + if ($this->orderType !== OrderType::LOOSE) { + return $this->remove(implode(':', $key)); } - return $this->remove(implode(':', $key)); + $keys = Permutation::permut($key); + $found = \Tests\PHPUnit\phpOMS\Utils\Converter\TemperatureTypeTest; + + foreach ($keys as $key => $value) { + $allFound = $this->remove(implode(':', $value)); + + if(!$allFound) { + $found = false; + } + } + + return $found; } /**