| Total Complexity | 6 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | final class OfficeRequest extends Request implements GotenbergRequestInterface |
||
| 6 | { |
||
| 7 | /** @var Document[] */ |
||
| 8 | private $files; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * OfficeRequest constructor. |
||
| 12 | * @param Document[] $files |
||
| 13 | */ |
||
| 14 | public function __construct(array $files) |
||
| 15 | { |
||
| 16 | $this->files = $files; |
||
| 17 | } |
||
| 18 | |||
| 19 | |||
| 20 | /** |
||
| 21 | * @return string |
||
| 22 | */ |
||
| 23 | public function getPostURL(): string |
||
| 24 | { |
||
| 25 | return '/convert/office'; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return array<string,mixed> |
||
| 30 | */ |
||
| 31 | public function getFormValues(): array |
||
| 32 | { |
||
| 33 | $values = []; |
||
| 34 | if (!empty($this->webhookURL)) { |
||
| 35 | $values[self::WEBHOOK_URL] = $this->webhookURL; |
||
| 36 | } |
||
| 37 | return $values; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return array<string,Document> |
||
| 42 | */ |
||
| 43 | public function getFormFiles(): array |
||
| 50 | } |
||
| 51 | } |
||
| 52 |