| Total Complexity | 4 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class PdfOptimizer |
||
| 13 | { |
||
| 14 | use PdfOptimizerProperties, ExportsScript; |
||
|
|
|||
| 15 | |||
| 16 | private ?LoggerInterface $logger = null; |
||
| 17 | |||
| 18 | |||
| 19 | public function __construct( |
||
| 20 | private readonly string $gsBinary = 'gs', |
||
| 21 | ) {} |
||
| 22 | |||
| 23 | public static function init(string $gsBinary = 'gs'): self |
||
| 24 | { |
||
| 25 | return new self($gsBinary); |
||
| 26 | } |
||
| 27 | |||
| 28 | |||
| 29 | public function logger(LoggerInterface $logger): self |
||
| 30 | { |
||
| 31 | $this->logger = $logger; |
||
| 32 | |||
| 33 | return $this; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function optimize(string $pathToFile, string $pathToOptimizedFile): OptimizeResult |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |