protected function buildGeneratorWrapper() { foreach ($this->generator as $key => &$value) { (yield null); $this->currentKey = $key; $this->currentValue =& $value; } }