From 8ec146185779d2c5e8eea89b18f4a34921ab97c8 Mon Sep 17 00:00:00 2001 From: Andrii Vasyliev Date: Wed, 12 Apr 2017 14:45:09 +0200 Subject: [PATCH] refactored exceptions --- src/exceptions/Exception.php | 20 +++++++++++++++++++ src/{ => exceptions}/FailedReadException.php | 4 ++-- src/{ => exceptions}/FailedWriteException.php | 4 ++-- .../UnsupportedFileTypeException.php | 4 ++-- 4 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 src/exceptions/Exception.php rename src/{ => exceptions}/FailedReadException.php (79%) rename src/{ => exceptions}/FailedWriteException.php (79%) rename src/{ => exceptions}/UnsupportedFileTypeException.php (76%) diff --git a/src/exceptions/Exception.php b/src/exceptions/Exception.php new file mode 100644 index 0000000..f9fe068 --- /dev/null +++ b/src/exceptions/Exception.php @@ -0,0 +1,20 @@ + + */ +class Exception extends \Exception +{ +} diff --git a/src/FailedReadException.php b/src/exceptions/FailedReadException.php similarity index 79% rename from src/FailedReadException.php rename to src/exceptions/FailedReadException.php index 1647ae7..ff4f8fe 100644 --- a/src/FailedReadException.php +++ b/src/exceptions/FailedReadException.php @@ -8,13 +8,13 @@ * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/) */ -namespace hiqdev\composer\config; +namespace hiqdev\composer\config\exceptions; /** * Failed read file exception. * * @author Andrii Vasyliev */ -class FailedReadException extends \Exception +class FailedReadException extends Exception { } diff --git a/src/FailedWriteException.php b/src/exceptions/FailedWriteException.php similarity index 79% rename from src/FailedWriteException.php rename to src/exceptions/FailedWriteException.php index 5f97c64..5d8a46a 100644 --- a/src/FailedWriteException.php +++ b/src/exceptions/FailedWriteException.php @@ -8,13 +8,13 @@ * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/) */ -namespace hiqdev\composer\config; +namespace hiqdev\composer\config\exceptions; /** * Failed write file exception. * * @author Andrii Vasyliev */ -class FailedWriteException extends \Exception +class FailedWriteException extends Exception { } diff --git a/src/UnsupportedFileTypeException.php b/src/exceptions/UnsupportedFileTypeException.php similarity index 76% rename from src/UnsupportedFileTypeException.php rename to src/exceptions/UnsupportedFileTypeException.php index 6e4a984..61ec6fd 100644 --- a/src/UnsupportedFileTypeException.php +++ b/src/exceptions/UnsupportedFileTypeException.php @@ -8,13 +8,13 @@ * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/) */ -namespace hiqdev\composer\config; +namespace hiqdev\composer\config\exceptions; /** * Unsupported file type exception. * * @author Andrii Vasyliev */ -class UnsupportedFileTypeException extends \Exception +class UnsupportedFileTypeException extends FailedReadException { }