| Total Complexity | 4 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class DefaultOptions extends Options |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * DefaultOptions constructor. |
||
| 11 | * |
||
| 12 | * @param array|null $attributes |
||
| 13 | */ |
||
| 14 | public function __construct(array $attributes = null) |
||
| 15 | { |
||
| 16 | parent::__construct($attributes); |
||
| 17 | |||
| 18 | $this->setDefaults(); |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Set the default Dompdf Options. |
||
| 23 | * |
||
| 24 | * @return $this |
||
| 25 | */ |
||
| 26 | private function setDefaults(): self |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Set the paper orientation to 'landscape'. |
||
| 41 | * |
||
| 42 | * @return $this |
||
| 43 | */ |
||
| 44 | public function setLandscape(): self |
||
| 45 | { |
||
| 46 | $this->setDefaultPaperOrientation('landscape'); |
||
| 47 | |||
| 48 | return $this; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Set the paper orientation to 'portrait'. |
||
| 53 | * |
||
| 54 | * @return $this |
||
| 55 | */ |
||
| 56 | public function setPortrait(): self |
||
| 61 | } |
||
| 62 | } |
||
| 63 |