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