/** * @return \Generator */ public function getIterator() : \Generator { if ($this->needResort) { uasort($this->keys, function ($a, $b) { return $this->comparator->compare($a, $b); }); $this->needResort = false; } yield from parent::getIterator(); }
/** * @param $key * @return bool */ public function hasValue($key) : bool { $key = $this->valueFactory->resolve($key); return parent::hasValue($key); }