protected function fixRecipe($key, $item) { foreach ($this->shapeItems[$key] as $entry) { $this->ingredients[$entry->y][$entry->x] = clone $item; } }