public function __construct(IdGeneratorInterface $idGenerator, ResourceInfo $resource, SpanLimits $spanLimits, SamplerInterface $sampler, array $spanProcessors) { $this->spanProcessor = match (count($spanProcessors)) { 0 => NoopSpanProcessor::getInstance(), 1 => $spanProcessors[0], default => new MultiSpanProcessor(...$spanProcessors), }; }