wasCalled)) { return; } $this->productCollection->{$name}(...$arguments); $this->wasCalled[$name] = true; } public function prefetchPriceTypes(): void { if (array_key_exists(__FUNCTION__, $this->wasCalled)) { return; } $this->productDiscountCalculator->prefetchPriceTypes($this->productCollection); $this->wasCalled[__FUNCTION__] = true; } public function fetchShowMaxInStore(): void { if (array_key_exists(__FUNCTION__, $this->wasCalled)) { return; } $this->productAvailability->fetchShowMaxInStore($this->productCollection); $this->wasCalled[__FUNCTION__] = true; } /** * @internal * * @private */ public function clear(): void { $this->wasCalled = []; } }