Skip to content

Commit b446974

Browse files
authored
Merge pull request #25 from Sammyjo20/feature/exceptions
Extended exceptions
2 parents c52235d + 6da8c56 commit b446974

18 files changed

+89
-41
lines changed

src/Exceptions/SaloonDuplicateHandlerException.php

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

33
namespace Sammyjo20\Saloon\Exceptions;
44

5-
use \Exception;
6-
7-
class SaloonDuplicateHandlerException extends Exception
5+
class SaloonDuplicateHandlerException extends SaloonException
86
{
97
public function __construct(string $name)
108
{

src/Exceptions/SaloonException.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Sammyjo20\Saloon\Exceptions;
4+
5+
use \Exception;
6+
7+
class SaloonException extends Exception
8+
{
9+
//
10+
}

src/Exceptions/SaloonInvalidConnectorException.php

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

33
namespace Sammyjo20\Saloon\Exceptions;
44

5-
use \Exception;
6-
7-
class SaloonInvalidConnectorException extends Exception
5+
class SaloonInvalidConnectorException extends SaloonException
86
{
97
public function __construct()
108
{

src/Exceptions/SaloonInvalidHandlerException.php

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

33
namespace Sammyjo20\Saloon\Exceptions;
44

5-
use \Exception;
6-
7-
class SaloonInvalidHandlerException extends Exception
5+
class SaloonInvalidHandlerException extends SaloonException
86
{
97
public function __construct(string $name)
108
{

src/Exceptions/SaloonInvalidMockResponseCaptureMethodException.php

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

33
namespace Sammyjo20\Saloon\Exceptions;
44

5-
use \Exception;
6-
7-
class SaloonInvalidMockResponseCaptureMethodException extends Exception
5+
class SaloonInvalidMockResponseCaptureMethodException extends SaloonException
86
{
97
public function __construct()
108
{

src/Exceptions/SaloonInvalidResponseClassException.php

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

33
namespace Sammyjo20\Saloon\Exceptions;
44

5-
use Exception;
6-
7-
class SaloonInvalidResponseClassException extends Exception
5+
class SaloonInvalidResponseClassException extends SaloonException
86
{
97
public function __construct()
108
{

src/Exceptions/SaloonMethodNotFoundException.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
namespace Sammyjo20\Saloon\Exceptions;
44

5-
use \Exception;
65
use Sammyjo20\Saloon\Http\SaloonConnector;
76

8-
class SaloonMethodNotFoundException extends Exception
7+
class SaloonMethodNotFoundException extends SaloonException
98
{
109
public function __construct(string $method, SaloonConnector $connector)
1110
{

src/Exceptions/SaloonMissingAttributeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use \Exception;
66
use Sammyjo20\Saloon\Http\SaloonRequest;
77

8-
class SaloonMissingAttributeException extends Exception
8+
class SaloonMissingAttributeException extends SaloonException
99
{
1010
/**
1111
* Throw an exception if we are missing a required attribute.

src/Exceptions/SaloonMissingMockException.php

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

33
namespace Sammyjo20\Saloon\Exceptions;
44

5-
use \Exception;
6-
7-
class SaloonMissingMockException extends Exception
5+
class SaloonMissingMockException extends SaloonException
86
{
97
//
108
}

src/Exceptions/SaloonMultipleMockMethodsException.php

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

33
namespace Sammyjo20\Saloon\Exceptions;
44

5-
use \Exception;
6-
7-
class SaloonMultipleMockMethodsException extends Exception
5+
class SaloonMultipleMockMethodsException extends SaloonException
86
{
97
public function __construct()
108
{

0 commit comments

Comments
 (0)