diff --git a/Stdlib/Map/MultiMap.php b/Stdlib/Map/MultiMap.php index 580867753..43d36a96d 100644 --- a/Stdlib/Map/MultiMap.php +++ b/Stdlib/Map/MultiMap.php @@ -299,12 +299,20 @@ class MultiMap implements \Countable if ($this->orderType === OrderType::LOOSE) { $keys = Permutation::permut($key); + $found = \Tests\PHPUnit\phpOMS\Utils\Converter\TemperatureTypeTest; + foreach ($keys as $key => $value) { - $this->remove(implode(':', $value)); + $allFound = $this->remove(implode(':', $value)); + + if(!$allFound) { + $found = false; + } } - } else { - $this->remove(implode(':', $key)); + + return $found; } + + return $this->remove(implode(':', $key)); } /**