$publishedSet * @return list> */ public static function forRequest( iterable $publishedSet, RequestContext $context, Degradation $degradation ): array { $entries = []; foreach ($publishedSet as $optin) { if (!TargetingEvaluator::matches($optin->targeting, $context)) { continue; } $entry = $degradation->intoPayload($optin->toPayloadEntry()); // Null is a [[Suspended]] Optin: it exists and is published, and a // rule it depends on is not available here. It emits nothing — // **no [[Impression]] and no [[Conversion]], rather than zeroes // against a live denominator** — and it resumes on its own when // the dependency returns, because nothing about it was stored and // nothing was destroyed. The Optin list is where the merchant // reads why (ADR 0027). if ($entry !== null) { $plan = \WConvert\Rules\DisplayPlan::forRequest($entry['display_rules'], $context); if ($plan === null) continue; $entry['display_rules'] = $plan; $entries[] = $entry; } } return $entries; } }