| Total Complexity | 9 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | final class Compactors |
||
| 21 | { |
||
| 22 | private $compactors; |
||
| 23 | private $scoperCompactor; |
||
| 24 | |||
| 25 | public function __construct(Compactor ...$compactors) |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | public function compactContents(string $file, string $contents): string |
||
| 39 | { |
||
| 40 | return (string) array_reduce( |
||
| 41 | $this->compactors, |
||
| 42 | function (string $contents, Compactor $compactor) use ($file): string { |
||
| 43 | return $compactor->compact($file, $contents); |
||
| 44 | }, |
||
| 45 | $contents |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | |||
| 49 | public function getScoperWhitelist(): ?Whitelist |
||
| 52 | } |
||
| 53 | |||
| 54 | public function registerWhitelist(Whitelist $whitelist): void |
||
| 58 | } |
||
| 59 | } |
||
| 60 | |||
| 61 | public function toArray(): array |
||
| 64 | } |
||
| 65 | } |
||
| 66 |