diff --git a/src/Domain/Exception/AlertException.php b/src/Domain/Exception/AlertException.php index 670c67b..2f5e955 100644 --- a/src/Domain/Exception/AlertException.php +++ b/src/Domain/Exception/AlertException.php @@ -11,7 +11,9 @@ * * @category Exception */ -class AlertException extends Exception +class AlertException extends Exception implements ExceptionLevelsInterface, ParentExceptionInterface { - use ParentExceptionTrait; + protected string $level = self::EXCEPTION_LEVEL_ALERT; + + use ParentExceptionTrait, ExceptionLevelsTrait; } diff --git a/src/Domain/Exception/CriticalException.php b/src/Domain/Exception/CriticalException.php index 3a66f1f..6f311da 100644 --- a/src/Domain/Exception/CriticalException.php +++ b/src/Domain/Exception/CriticalException.php @@ -11,7 +11,9 @@ * * @category Exception */ -class CriticalException extends Exception +class CriticalException extends Exception implements ExceptionLevelsInterface, ParentExceptionInterface { - use ParentExceptionTrait; + protected string $level = self::EXCEPTION_LEVEL_CRITICAL; + + use ParentExceptionTrait, ExceptionLevelsTrait; } diff --git a/src/Domain/Exception/EmergencyException.php b/src/Domain/Exception/EmergencyException.php index 0c17797..ae5c229 100644 --- a/src/Domain/Exception/EmergencyException.php +++ b/src/Domain/Exception/EmergencyException.php @@ -11,7 +11,9 @@ * * @category Exception */ -class EmergencyException extends Exception +class EmergencyException extends Exception implements ExceptionLevelsInterface, ParentExceptionInterface { - use ParentExceptionTrait; + protected string $level = self::EXCEPTION_LEVEL_EMERGENCY; + + use ParentExceptionTrait, ExceptionLevelsTrait; } diff --git a/src/Domain/Exception/ErrorException.php b/src/Domain/Exception/ErrorException.php index 533d028..bb3b4f8 100644 --- a/src/Domain/Exception/ErrorException.php +++ b/src/Domain/Exception/ErrorException.php @@ -11,7 +11,7 @@ * * @category Exception */ -class ErrorException extends Exception +class ErrorException extends Exception implements ExceptionLevelsInterface, ParentExceptionInterface { - use ParentExceptionTrait; + use ParentExceptionTrait, ExceptionLevelsTrait; } diff --git a/src/Domain/Exception/ExceptionLevelsInterface.php b/src/Domain/Exception/ExceptionLevelsInterface.php new file mode 100644 index 0000000..ab425a7 --- /dev/null +++ b/src/Domain/Exception/ExceptionLevelsInterface.php @@ -0,0 +1,25 @@ +levels; + } +} diff --git a/src/Domain/Exception/FactoryException.php b/src/Domain/Exception/FactoryException.php index fd4e84f..a96c412 100644 --- a/src/Domain/Exception/FactoryException.php +++ b/src/Domain/Exception/FactoryException.php @@ -9,6 +9,6 @@ * * @category Domain\Exception */ -final class FactoryException extends CriticalException +class FactoryException extends CriticalException { } diff --git a/src/Domain/Exception/InvalidDataException.php b/src/Domain/Exception/InvalidDataException.php index e08d600..da58bdb 100644 --- a/src/Domain/Exception/InvalidDataException.php +++ b/src/Domain/Exception/InvalidDataException.php @@ -9,6 +9,6 @@ * * @category Domain\Exception */ -final class InvalidDataException extends ErrorException +class InvalidDataException extends ErrorException { } diff --git a/src/Domain/Exception/InvalidDataTypeException.php b/src/Domain/Exception/InvalidDataTypeException.php index ddbbdbc..ad01437 100644 --- a/src/Domain/Exception/InvalidDataTypeException.php +++ b/src/Domain/Exception/InvalidDataTypeException.php @@ -9,6 +9,6 @@ * * @category Domain\Exception */ -final class InvalidDataTypeException extends ErrorException +class InvalidDataTypeException extends ErrorException { } diff --git a/src/Domain/Exception/InvalidResponseContentTypeException.php b/src/Domain/Exception/InvalidResponseContentTypeException.php index 366704a..48b5487 100644 --- a/src/Domain/Exception/InvalidResponseContentTypeException.php +++ b/src/Domain/Exception/InvalidResponseContentTypeException.php @@ -9,6 +9,6 @@ * * @category Domain\Exception */ -final class InvalidResponseContentTypeException extends CriticalException +class InvalidResponseContentTypeException extends CriticalException { } diff --git a/src/Domain/Exception/InvalidResponseStatusCodeException.php b/src/Domain/Exception/InvalidResponseStatusCodeException.php index 44fa9e9..5122e56 100644 --- a/src/Domain/Exception/InvalidResponseStatusCodeException.php +++ b/src/Domain/Exception/InvalidResponseStatusCodeException.php @@ -9,6 +9,6 @@ * * @category Domain\Exception */ -final class InvalidResponseStatusCodeException extends CriticalException +class InvalidResponseStatusCodeException extends CriticalException { } diff --git a/src/Domain/Exception/InvalidResponseStatusException.php b/src/Domain/Exception/InvalidResponseStatusException.php index 49ec0b6..4207138 100644 --- a/src/Domain/Exception/InvalidResponseStatusException.php +++ b/src/Domain/Exception/InvalidResponseStatusException.php @@ -9,6 +9,6 @@ * * @category Domain\Exception */ -final class InvalidResponseStatusException extends CriticalException +class InvalidResponseStatusException extends CriticalException { } diff --git a/src/Domain/Exception/LoggerException.php b/src/Domain/Exception/LoggerException.php index 7872da2..0ebfe8b 100644 --- a/src/Domain/Exception/LoggerException.php +++ b/src/Domain/Exception/LoggerException.php @@ -9,6 +9,6 @@ * * @category Domain\Exception */ -final class LoggerException extends ErrorException +class LoggerException extends ErrorException { }