From b4f5df945efc6b68247ee218969e6c9ad7f851e8 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Thu, 7 Jan 2016 15:05:28 +0000 Subject: [PATCH] Moves bus exceptions. Closes #1334 --- app/{ => Bus}/Exceptions/ExceptionInterface.php | 3 ++- .../Exceptions/Subscriber}/AlreadySubscribedException.php | 4 +++- .../Commands/Subscriber/SubscribeSubscriberCommandHandler.php | 2 +- app/Http/Controllers/SubscribeController.php | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) rename app/{ => Bus}/Exceptions/ExceptionInterface.php (80%) rename app/{Exceptions => Bus/Exceptions/Subscriber}/AlreadySubscribedException.php (73%) diff --git a/app/Exceptions/ExceptionInterface.php b/app/Bus/Exceptions/ExceptionInterface.php similarity index 80% rename from app/Exceptions/ExceptionInterface.php rename to app/Bus/Exceptions/ExceptionInterface.php index 15ce0eee..5d60b6a7 100644 --- a/app/Exceptions/ExceptionInterface.php +++ b/app/Bus/Exceptions/ExceptionInterface.php @@ -9,12 +9,13 @@ * file that was distributed with this source code. */ -namespace CachetHQ\Cachet\Exceptions; +namespace CachetHQ\Cachet\Bus\Exceptions; /** * This is the exception interface. * * @author Graham Campbell + * @author James Brooks */ interface ExceptionInterface { diff --git a/app/Exceptions/AlreadySubscribedException.php b/app/Bus/Exceptions/Subscriber/AlreadySubscribedException.php similarity index 73% rename from app/Exceptions/AlreadySubscribedException.php rename to app/Bus/Exceptions/Subscriber/AlreadySubscribedException.php index dacf00dc..8e88578c 100644 --- a/app/Exceptions/AlreadySubscribedException.php +++ b/app/Bus/Exceptions/Subscriber/AlreadySubscribedException.php @@ -9,14 +9,16 @@ * file that was distributed with this source code. */ -namespace CachetHQ\Cachet\Exceptions; +namespace CachetHQ\Cachet\Bus\Exceptions\Subscriber; +use CachetHQ\Cachet\Bus\Exceptions\ExceptionInterface; use Exception; /** * This is the already subscribed exception class. * * @author Graham Campbell + * @author James Brooks */ class AlreadySubscribedException extends Exception implements ExceptionInterface { diff --git a/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php b/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php index a61fc858..12238268 100644 --- a/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php +++ b/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php @@ -14,7 +14,7 @@ namespace CachetHQ\Cachet\Bus\Handlers\Commands\Subscriber; use CachetHQ\Cachet\Bus\Commands\Subscriber\SubscribeSubscriberCommand; use CachetHQ\Cachet\Bus\Commands\Subscriber\VerifySubscriberCommand; use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasSubscribedEvent; -use CachetHQ\Cachet\Exceptions\AlreadySubscribedException; +use CachetHQ\Cachet\Bus\Exceptions\Subscriber\AlreadySubscribedException; use CachetHQ\Cachet\Models\Subscriber; class SubscribeSubscriberCommandHandler diff --git a/app/Http/Controllers/SubscribeController.php b/app/Http/Controllers/SubscribeController.php index bba62779..43085729 100644 --- a/app/Http/Controllers/SubscribeController.php +++ b/app/Http/Controllers/SubscribeController.php @@ -15,7 +15,7 @@ use AltThree\Validator\ValidationException; use CachetHQ\Cachet\Bus\Commands\Subscriber\SubscribeSubscriberCommand; use CachetHQ\Cachet\Bus\Commands\Subscriber\UnsubscribeSubscriberCommand; use CachetHQ\Cachet\Bus\Commands\Subscriber\VerifySubscriberCommand; -use CachetHQ\Cachet\Exceptions\AlreadySubscribedException; +use CachetHQ\Cachet\Bus\Exceptions\Subscriber\AlreadySubscribedException; use CachetHQ\Cachet\Facades\Setting; use CachetHQ\Cachet\Models\Subscriber; use GrahamCampbell\Binput\Facades\Binput;