diff --git a/src/Client/CupsIppHttpClient.php b/src/Client/CupsIppHttpClient.php index 599b7d8..c8a9a8c 100644 --- a/src/Client/CupsIppHttpClient.php +++ b/src/Client/CupsIppHttpClient.php @@ -23,7 +23,7 @@ public function __construct(private readonly IppServer $server, private readonly /** * @param IppOperation $operation * - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function sendRequest(IppOperation $operation): ResponseInterface { diff --git a/src/Client/IppHttpClientInterface.php b/src/Client/IppHttpClientInterface.php index d60dda9..e943a14 100644 --- a/src/Client/IppHttpClientInterface.php +++ b/src/Client/IppHttpClientInterface.php @@ -11,7 +11,7 @@ interface IppHttpClientInterface { /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function sendRequest(IppOperation $operation): ResponseInterface; } diff --git a/src/Ipp.php b/src/Ipp.php index 0105dff..734b2a7 100644 --- a/src/Ipp.php +++ b/src/Ipp.php @@ -6,6 +6,7 @@ use DR\Ipp\Client\CupsIppHttpClient; use DR\Ipp\Client\IppHttpClientInterface; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\IppJob; use DR\Ipp\Entity\IppPrinter; use DR\Ipp\Entity\IppPrintFile; @@ -66,7 +67,7 @@ public function printerAdministration(): PrinterAdminService } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function print(IppPrinter $printer, IppPrintFile $file): IppResponseInterface { @@ -76,7 +77,7 @@ public function print(IppPrinter $printer, IppPrintFile $file): IppResponseInter } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function getJobAttributes(IppJob $job): IppResponseInterface { @@ -87,7 +88,7 @@ public function getJobAttributes(IppJob $job): IppResponseInterface /** * Requests a list of printer attributes for the specified printer - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function getPrinterAttributes(IppPrinter $printer): IppResponseInterface { @@ -97,7 +98,7 @@ public function getPrinterAttributes(IppPrinter $printer): IppResponseInterface } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function getJobs(IppPrinter $printer, bool $completed = false): IppResponseInterface { @@ -107,7 +108,7 @@ public function getJobs(IppPrinter $printer, bool $completed = false): IppRespon } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function cancelJob(IppJob $job): IppResponseInterface { @@ -117,7 +118,7 @@ public function cancelJob(IppJob $job): IppResponseInterface } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function validatePrintJob(IppPrinter $printer, IppPrintFile $file): IppResponseInterface { diff --git a/src/Operations/CancelJobOperation.php b/src/Operations/CancelJobOperation.php index e5e2a7e..1e8751c 100644 --- a/src/Operations/CancelJobOperation.php +++ b/src/Operations/CancelJobOperation.php @@ -5,6 +5,7 @@ namespace DR\Ipp\Operations; use DR\Ipp\Client\IppHttpClientInterface; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\IppJob; use DR\Ipp\Entity\Response\IppResponseInterface; use DR\Ipp\Enum\IppOperationEnum; @@ -24,7 +25,7 @@ public function __construct(private readonly IppHttpClientInterface $client, pri } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function cancel(IppJob $job): IppResponseInterface { diff --git a/src/Operations/CreatePrinterInterface.php b/src/Operations/CreatePrinterInterface.php index e59a648..68ab8cf 100644 --- a/src/Operations/CreatePrinterInterface.php +++ b/src/Operations/CreatePrinterInterface.php @@ -4,6 +4,7 @@ namespace DR\Ipp\Operations; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\IppPrinter; use DR\Ipp\Entity\Response\IppResponseInterface; use Psr\Http\Client\ClientExceptionInterface; @@ -11,7 +12,7 @@ interface CreatePrinterInterface { /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function create(IppPrinter $printer): IppResponseInterface; } diff --git a/src/Operations/Cups/CupsCreatePrinter.php b/src/Operations/Cups/CupsCreatePrinter.php index c6215a9..52d60a0 100644 --- a/src/Operations/Cups/CupsCreatePrinter.php +++ b/src/Operations/Cups/CupsCreatePrinter.php @@ -5,6 +5,7 @@ namespace DR\Ipp\Operations\Cups; use DR\Ipp\Client\IppHttpClientInterface; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\IppPrinter; use DR\Ipp\Entity\IppServer; use DR\Ipp\Entity\Response\IppResponseInterface; @@ -31,7 +32,7 @@ public function __construct( } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function create(IppPrinter $printer): IppResponseInterface { diff --git a/src/Operations/Cups/CupsDeletePrinter.php b/src/Operations/Cups/CupsDeletePrinter.php index 8f5900a..4c0e670 100644 --- a/src/Operations/Cups/CupsDeletePrinter.php +++ b/src/Operations/Cups/CupsDeletePrinter.php @@ -5,6 +5,7 @@ namespace DR\Ipp\Operations\Cups; use DR\Ipp\Client\IppHttpClientInterface; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\IppPrinter; use DR\Ipp\Entity\IppServer; use DR\Ipp\Entity\Response\IppResponseInterface; @@ -29,7 +30,7 @@ public function __construct( } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function delete(IppPrinter $printer): IppResponseInterface { diff --git a/src/Operations/Cups/CupsGetPrinters.php b/src/Operations/Cups/CupsGetPrinters.php index cdca0e3..4b7f669 100644 --- a/src/Operations/Cups/CupsGetPrinters.php +++ b/src/Operations/Cups/CupsGetPrinters.php @@ -5,6 +5,7 @@ namespace DR\Ipp\Operations\Cups; use DR\Ipp\Client\IppHttpClientInterface; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\Response\IppResponseInterface; use DR\Ipp\Enum\IppOperationEnum; use DR\Ipp\Enum\IppTypeEnum; @@ -28,7 +29,7 @@ public function __construct(private readonly IppHttpClientInterface $client, pri } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function get(): IppResponseInterface { diff --git a/src/Operations/DeletePrinterInterface.php b/src/Operations/DeletePrinterInterface.php index 4037317..9b993c8 100644 --- a/src/Operations/DeletePrinterInterface.php +++ b/src/Operations/DeletePrinterInterface.php @@ -4,6 +4,7 @@ namespace DR\Ipp\Operations; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\IppPrinter; use DR\Ipp\Entity\Response\IppResponseInterface; use Psr\Http\Client\ClientExceptionInterface; @@ -11,7 +12,7 @@ interface DeletePrinterInterface { /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function delete(IppPrinter $printer): IppResponseInterface; } diff --git a/src/Operations/GetJobAttributesOperation.php b/src/Operations/GetJobAttributesOperation.php index bf93d6d..c8d2c28 100644 --- a/src/Operations/GetJobAttributesOperation.php +++ b/src/Operations/GetJobAttributesOperation.php @@ -5,6 +5,7 @@ namespace DR\Ipp\Operations; use DR\Ipp\Client\IppHttpClientInterface; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\IppJob; use DR\Ipp\Entity\Response\IppResponseInterface; use DR\Ipp\Enum\IppOperationEnum; @@ -24,7 +25,7 @@ public function __construct(private readonly IppHttpClientInterface $client, pri } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function getJob(IppJob $job): IppResponseInterface { diff --git a/src/Operations/GetJobsOperation.php b/src/Operations/GetJobsOperation.php index 32fe02d..151bd09 100644 --- a/src/Operations/GetJobsOperation.php +++ b/src/Operations/GetJobsOperation.php @@ -5,6 +5,7 @@ namespace DR\Ipp\Operations; use DR\Ipp\Client\IppHttpClientInterface; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\IppPrinter; use DR\Ipp\Entity\IppServer; use DR\Ipp\Entity\Response\IppResponseInterface; @@ -28,7 +29,7 @@ public function __construct( } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function getJobList(IppPrinter $printer, bool $completed = false): IppResponseInterface { diff --git a/src/Operations/GetPrinterAttributesOperation.php b/src/Operations/GetPrinterAttributesOperation.php index 6c820c8..92001e0 100644 --- a/src/Operations/GetPrinterAttributesOperation.php +++ b/src/Operations/GetPrinterAttributesOperation.php @@ -5,6 +5,7 @@ namespace DR\Ipp\Operations; use DR\Ipp\Client\IppHttpClientInterface; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\IppPrinter; use DR\Ipp\Entity\IppServer; use DR\Ipp\Entity\Response\IppResponseInterface; @@ -28,7 +29,7 @@ public function __construct( } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function getAttributes(IppPrinter $printer): IppResponseInterface { diff --git a/src/Operations/GetPrintersInterface.php b/src/Operations/GetPrintersInterface.php index 39e6500..0d296c4 100644 --- a/src/Operations/GetPrintersInterface.php +++ b/src/Operations/GetPrintersInterface.php @@ -4,13 +4,14 @@ namespace DR\Ipp\Operations; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\Response\IppResponseInterface; use Psr\Http\Client\ClientExceptionInterface; interface GetPrintersInterface { /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function get(): IppResponseInterface; } diff --git a/src/Operations/PrintOperation.php b/src/Operations/PrintOperation.php index 186890d..a09d7fe 100644 --- a/src/Operations/PrintOperation.php +++ b/src/Operations/PrintOperation.php @@ -5,6 +5,7 @@ namespace DR\Ipp\Operations; use DR\Ipp\Client\IppHttpClientInterface; +use DR\Ipp\Client\IppRequestException; use DR\Ipp\Entity\IppPrinter; use DR\Ipp\Entity\IppPrintFile; use DR\Ipp\Entity\IppServer; @@ -35,7 +36,7 @@ public function __construct( } /** - * @throws ClientExceptionInterface + * @throws ClientExceptionInterface|IppRequestException */ public function print(IppPrinter $printer, IppPrintFile $file, bool $dryRun = false): IppResponseInterface {