Skip to content

Commit a6bbaf2

Browse files
author
Mohamed Khaled
committed
Implement exception hierarchy improvements
1 parent 23ceb28 commit a6bbaf2

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Exceptions/AiClientExceptionInterface.php renamed to src/Common/Contracts/AiClientExceptionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace WordPress\AiClient\Exceptions;
5+
namespace WordPress\AiClient\Common\Contracts;
66

77
use Throwable;
88

src/Common/Exception/InvalidArgumentException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace WordPress\AiClient\Common\Exception;
66

7-
use WordPress\AiClient\Exceptions\AiClientExceptionInterface;
7+
use WordPress\AiClient\Common\Contracts\AiClientExceptionInterface;
88

99
/**
1010
* Exception thrown when an invalid argument is provided.

src/Common/Exception/RuntimeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace WordPress\AiClient\Common\Exception;
66

7-
use WordPress\AiClient\Exceptions\AiClientExceptionInterface;
7+
use WordPress\AiClient\Common\Contracts\AiClientExceptionInterface;
88

99
/**
1010
* Exception thrown for runtime errors.

tests/unit/Exceptions/ExceptionsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
namespace WordPress\AiClient\Tests\unit\Exceptions;
66

77
use PHPUnit\Framework\TestCase;
8+
use WordPress\AiClient\Common\Contracts\AiClientExceptionInterface;
89
use WordPress\AiClient\Common\Exception\InvalidArgumentException;
910
use WordPress\AiClient\Common\Exception\RuntimeException;
10-
use WordPress\AiClient\Exceptions\AiClientExceptionInterface;
1111
use WordPress\AiClient\Providers\Http\Exception\NetworkException;
1212
use WordPress\AiClient\Providers\Http\Exception\RequestException;
1313

@@ -17,7 +17,7 @@
1717
* @since 0.2.0
1818
* @covers \WordPress\AiClient\Common\Exception\InvalidArgumentException
1919
* @covers \WordPress\AiClient\Common\Exception\RuntimeException
20-
* @covers \WordPress\AiClient\Exceptions\AiClientExceptionInterface
20+
* @covers \WordPress\AiClient\Common\Contracts\AiClientExceptionInterface
2121
* @covers \WordPress\AiClient\Providers\Http\Exception\NetworkException
2222
* @covers \WordPress\AiClient\Providers\Http\Exception\RequestException
2323
*/

0 commit comments

Comments
 (0)