Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Client/CupsIppHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Client/IppHttpClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
interface IppHttpClientInterface
{
/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function sendRequest(IppOperation $operation): ResponseInterface;
}
13 changes: 7 additions & 6 deletions src/Ipp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -66,7 +67,7 @@ public function printerAdministration(): PrinterAdminService
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function print(IppPrinter $printer, IppPrintFile $file): IppResponseInterface
{
Expand All @@ -76,7 +77,7 @@ public function print(IppPrinter $printer, IppPrintFile $file): IppResponseInter
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function getJobAttributes(IppJob $job): IppResponseInterface
{
Expand All @@ -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
{
Expand All @@ -97,7 +98,7 @@ public function getPrinterAttributes(IppPrinter $printer): IppResponseInterface
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function getJobs(IppPrinter $printer, bool $completed = false): IppResponseInterface
{
Expand All @@ -107,7 +108,7 @@ public function getJobs(IppPrinter $printer, bool $completed = false): IppRespon
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function cancelJob(IppJob $job): IppResponseInterface
{
Expand All @@ -117,7 +118,7 @@ public function cancelJob(IppJob $job): IppResponseInterface
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function validatePrintJob(IppPrinter $printer, IppPrintFile $file): IppResponseInterface
{
Expand Down
3 changes: 2 additions & 1 deletion src/Operations/CancelJobOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -24,7 +25,7 @@ public function __construct(private readonly IppHttpClientInterface $client, pri
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function cancel(IppJob $job): IppResponseInterface
{
Expand Down
3 changes: 2 additions & 1 deletion src/Operations/CreatePrinterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

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;

interface CreatePrinterInterface
{
/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function create(IppPrinter $printer): IppResponseInterface;
}
3 changes: 2 additions & 1 deletion src/Operations/Cups/CupsCreatePrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -31,7 +32,7 @@ public function __construct(
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function create(IppPrinter $printer): IppResponseInterface
{
Expand Down
3 changes: 2 additions & 1 deletion src/Operations/Cups/CupsDeletePrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -29,7 +30,7 @@ public function __construct(
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function delete(IppPrinter $printer): IppResponseInterface
{
Expand Down
3 changes: 2 additions & 1 deletion src/Operations/Cups/CupsGetPrinters.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,7 +29,7 @@ public function __construct(private readonly IppHttpClientInterface $client, pri
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function get(): IppResponseInterface
{
Expand Down
3 changes: 2 additions & 1 deletion src/Operations/DeletePrinterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

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;

interface DeletePrinterInterface
{
/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function delete(IppPrinter $printer): IppResponseInterface;
}
3 changes: 2 additions & 1 deletion src/Operations/GetJobAttributesOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -24,7 +25,7 @@ public function __construct(private readonly IppHttpClientInterface $client, pri
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function getJob(IppJob $job): IppResponseInterface
{
Expand Down
3 changes: 2 additions & 1 deletion src/Operations/GetJobsOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,7 +29,7 @@ public function __construct(
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function getJobList(IppPrinter $printer, bool $completed = false): IppResponseInterface
{
Expand Down
3 changes: 2 additions & 1 deletion src/Operations/GetPrinterAttributesOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,7 +29,7 @@ public function __construct(
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function getAttributes(IppPrinter $printer): IppResponseInterface
{
Expand Down
3 changes: 2 additions & 1 deletion src/Operations/GetPrintersInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 2 additions & 1 deletion src/Operations/PrintOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -35,7 +36,7 @@ public function __construct(
}

/**
* @throws ClientExceptionInterface
* @throws ClientExceptionInterface|IppRequestException
*/
public function print(IppPrinter $printer, IppPrintFile $file, bool $dryRun = false): IppResponseInterface
{
Expand Down