for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Lamoda\Metric\Common\Source;
use Lamoda\Metric\Common\MetricSourceInterface;
final class MergingMetricSource implements \IteratorAggregate, MetricSourceInterface
{
/** @var MetricSourceInterface[] */
private $sources;
public function __construct(MetricSourceInterface ...$sources)
$this->sources = $sources;
}
/** {@inheritdoc} */
public function getIterator(): \Traversable
return $this->getMetrics();
public function getMetrics(): \Traversable
foreach ($this->sources as $source) {
yield from $source;