Skip to content

Commit 4116b4e

Browse files
authored
Merge pull request #22 from 123inkt/update_doc_block_with_IppRequestException
Add IppRequestException to the appropriate docblocks
2 parents c90def7 + ed9f4b0 commit 4116b4e

14 files changed

+31
-19
lines changed

src/Client/CupsIppHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function __construct(private readonly IppServer $server, private readonly
2323
/**
2424
* @param IppOperation $operation
2525
*
26-
* @throws ClientExceptionInterface
26+
* @throws ClientExceptionInterface|IppRequestException
2727
*/
2828
public function sendRequest(IppOperation $operation): ResponseInterface
2929
{

src/Client/IppHttpClientInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
interface IppHttpClientInterface
1212
{
1313
/**
14-
* @throws ClientExceptionInterface
14+
* @throws ClientExceptionInterface|IppRequestException
1515
*/
1616
public function sendRequest(IppOperation $operation): ResponseInterface;
1717
}

src/Ipp.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use DR\Ipp\Client\CupsIppHttpClient;
88
use DR\Ipp\Client\IppHttpClientInterface;
9+
use DR\Ipp\Client\IppRequestException;
910
use DR\Ipp\Entity\IppJob;
1011
use DR\Ipp\Entity\IppPrinter;
1112
use DR\Ipp\Entity\IppPrintFile;
@@ -66,7 +67,7 @@ public function printerAdministration(): PrinterAdminService
6667
}
6768

6869
/**
69-
* @throws ClientExceptionInterface
70+
* @throws ClientExceptionInterface|IppRequestException
7071
*/
7172
public function print(IppPrinter $printer, IppPrintFile $file): IppResponseInterface
7273
{
@@ -76,7 +77,7 @@ public function print(IppPrinter $printer, IppPrintFile $file): IppResponseInter
7677
}
7778

7879
/**
79-
* @throws ClientExceptionInterface
80+
* @throws ClientExceptionInterface|IppRequestException
8081
*/
8182
public function getJobAttributes(IppJob $job): IppResponseInterface
8283
{
@@ -87,7 +88,7 @@ public function getJobAttributes(IppJob $job): IppResponseInterface
8788

8889
/**
8990
* Requests a list of printer attributes for the specified printer
90-
* @throws ClientExceptionInterface
91+
* @throws ClientExceptionInterface|IppRequestException
9192
*/
9293
public function getPrinterAttributes(IppPrinter $printer): IppResponseInterface
9394
{
@@ -97,7 +98,7 @@ public function getPrinterAttributes(IppPrinter $printer): IppResponseInterface
9798
}
9899

99100
/**
100-
* @throws ClientExceptionInterface
101+
* @throws ClientExceptionInterface|IppRequestException
101102
*/
102103
public function getJobs(IppPrinter $printer, bool $completed = false): IppResponseInterface
103104
{
@@ -107,7 +108,7 @@ public function getJobs(IppPrinter $printer, bool $completed = false): IppRespon
107108
}
108109

109110
/**
110-
* @throws ClientExceptionInterface
111+
* @throws ClientExceptionInterface|IppRequestException
111112
*/
112113
public function cancelJob(IppJob $job): IppResponseInterface
113114
{
@@ -117,7 +118,7 @@ public function cancelJob(IppJob $job): IppResponseInterface
117118
}
118119

119120
/**
120-
* @throws ClientExceptionInterface
121+
* @throws ClientExceptionInterface|IppRequestException
121122
*/
122123
public function validatePrintJob(IppPrinter $printer, IppPrintFile $file): IppResponseInterface
123124
{

src/Operations/CancelJobOperation.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace DR\Ipp\Operations;
66

77
use DR\Ipp\Client\IppHttpClientInterface;
8+
use DR\Ipp\Client\IppRequestException;
89
use DR\Ipp\Entity\IppJob;
910
use DR\Ipp\Entity\Response\IppResponseInterface;
1011
use DR\Ipp\Enum\IppOperationEnum;
@@ -24,7 +25,7 @@ public function __construct(private readonly IppHttpClientInterface $client, pri
2425
}
2526

2627
/**
27-
* @throws ClientExceptionInterface
28+
* @throws ClientExceptionInterface|IppRequestException
2829
*/
2930
public function cancel(IppJob $job): IppResponseInterface
3031
{

src/Operations/CreatePrinterInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
namespace DR\Ipp\Operations;
66

7+
use DR\Ipp\Client\IppRequestException;
78
use DR\Ipp\Entity\IppPrinter;
89
use DR\Ipp\Entity\Response\IppResponseInterface;
910
use Psr\Http\Client\ClientExceptionInterface;
1011

1112
interface CreatePrinterInterface
1213
{
1314
/**
14-
* @throws ClientExceptionInterface
15+
* @throws ClientExceptionInterface|IppRequestException
1516
*/
1617
public function create(IppPrinter $printer): IppResponseInterface;
1718
}

src/Operations/Cups/CupsCreatePrinter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace DR\Ipp\Operations\Cups;
66

77
use DR\Ipp\Client\IppHttpClientInterface;
8+
use DR\Ipp\Client\IppRequestException;
89
use DR\Ipp\Entity\IppPrinter;
910
use DR\Ipp\Entity\IppServer;
1011
use DR\Ipp\Entity\Response\IppResponseInterface;
@@ -31,7 +32,7 @@ public function __construct(
3132
}
3233

3334
/**
34-
* @throws ClientExceptionInterface
35+
* @throws ClientExceptionInterface|IppRequestException
3536
*/
3637
public function create(IppPrinter $printer): IppResponseInterface
3738
{

src/Operations/Cups/CupsDeletePrinter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace DR\Ipp\Operations\Cups;
66

77
use DR\Ipp\Client\IppHttpClientInterface;
8+
use DR\Ipp\Client\IppRequestException;
89
use DR\Ipp\Entity\IppPrinter;
910
use DR\Ipp\Entity\IppServer;
1011
use DR\Ipp\Entity\Response\IppResponseInterface;
@@ -29,7 +30,7 @@ public function __construct(
2930
}
3031

3132
/**
32-
* @throws ClientExceptionInterface
33+
* @throws ClientExceptionInterface|IppRequestException
3334
*/
3435
public function delete(IppPrinter $printer): IppResponseInterface
3536
{

src/Operations/Cups/CupsGetPrinters.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace DR\Ipp\Operations\Cups;
66

77
use DR\Ipp\Client\IppHttpClientInterface;
8+
use DR\Ipp\Client\IppRequestException;
89
use DR\Ipp\Entity\Response\IppResponseInterface;
910
use DR\Ipp\Enum\IppOperationEnum;
1011
use DR\Ipp\Enum\IppTypeEnum;
@@ -28,7 +29,7 @@ public function __construct(private readonly IppHttpClientInterface $client, pri
2829
}
2930

3031
/**
31-
* @throws ClientExceptionInterface
32+
* @throws ClientExceptionInterface|IppRequestException
3233
*/
3334
public function get(): IppResponseInterface
3435
{

src/Operations/DeletePrinterInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
namespace DR\Ipp\Operations;
66

7+
use DR\Ipp\Client\IppRequestException;
78
use DR\Ipp\Entity\IppPrinter;
89
use DR\Ipp\Entity\Response\IppResponseInterface;
910
use Psr\Http\Client\ClientExceptionInterface;
1011

1112
interface DeletePrinterInterface
1213
{
1314
/**
14-
* @throws ClientExceptionInterface
15+
* @throws ClientExceptionInterface|IppRequestException
1516
*/
1617
public function delete(IppPrinter $printer): IppResponseInterface;
1718
}

src/Operations/GetJobAttributesOperation.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace DR\Ipp\Operations;
66

77
use DR\Ipp\Client\IppHttpClientInterface;
8+
use DR\Ipp\Client\IppRequestException;
89
use DR\Ipp\Entity\IppJob;
910
use DR\Ipp\Entity\Response\IppResponseInterface;
1011
use DR\Ipp\Enum\IppOperationEnum;
@@ -24,7 +25,7 @@ public function __construct(private readonly IppHttpClientInterface $client, pri
2425
}
2526

2627
/**
27-
* @throws ClientExceptionInterface
28+
* @throws ClientExceptionInterface|IppRequestException
2829
*/
2930
public function getJob(IppJob $job): IppResponseInterface
3031
{

0 commit comments

Comments
 (0)