alexdebril/feed-io

View on GitHub
src/FeedIo/Reader/FixerSet.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

declare(strict_types=1);

namespace FeedIo\Reader;

class FixerSet
{
    protected array $fixers = [];

    public function add(FixerAbstract $fixer): FixerSet
    {
        $this->fixers[] = $fixer;

        return $this;
    }

    public function correct(Result $result): FixerSet
    {
        foreach ($this->fixers as $fixer) {
            $fixer->correct($result);
        }

        return $this;
    }
}