| Total Complexity | 5 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | class StackProcessor implements ProcessorInterface |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * @var array<int, \Phauthentic\Infrastructure\Storage\Processor\ProcessorInterface> |
||
| 29 | */ |
||
| 30 | protected array $processors = []; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param \Phauthentic\Infrastructure\Storage\Processor\ProcessorInterface[] $processors |
||
| 34 | */ |
||
| 35 | public function __construct(array $processors) |
||
| 36 | { |
||
| 37 | foreach ($processors as $processor) { |
||
| 38 | $this->add($processor); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param \Phauthentic\Infrastructure\Storage\Processor\ProcessorInterface $processor |
||
| 44 | */ |
||
| 45 | public function add(ProcessorInterface $processor): void |
||
| 46 | { |
||
| 47 | $this->processors[] = $processor; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @inheritdoc |
||
| 52 | */ |
||
| 53 | public function process(FileInterface $file): FileInterface |
||
| 60 | } |
||
| 61 | } |
||
| 62 |