From 670efa3544874ff2abde286e6c83bf181c3f6a06 Mon Sep 17 00:00:00 2001 From: ayan4m1 Date: Sat, 15 Sep 2018 19:59:07 -0400 Subject: [PATCH] styleci tweaks --- app/Http/Controllers/Admin/Settings/MailController.php | 10 +++++++--- app/Notifications/MailTested.php | 7 ++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Admin/Settings/MailController.php b/app/Http/Controllers/Admin/Settings/MailController.php index 0b9088b0b..cfab24a23 100644 --- a/app/Http/Controllers/Admin/Settings/MailController.php +++ b/app/Http/Controllers/Admin/Settings/MailController.php @@ -3,16 +3,18 @@ namespace Pterodactyl\Http\Controllers\Admin\Settings; use Exception; -use Illuminate\Http\Request; -use Illuminate\Support\Facades\Notification; + + use Illuminate\View\View; +use Illuminate\Http\Request; use Illuminate\Http\RedirectResponse; use Prologue\Alerts\AlertsMessageBag; use Illuminate\Contracts\Console\Kernel; +use Pterodactyl\Notifications\MailTested; +use Illuminate\Support\Facades\Notification; use Pterodactyl\Exceptions\DisplayException; use Pterodactyl\Http\Controllers\Controller; use Illuminate\Contracts\Encryption\Encrypter; -use Pterodactyl\Notifications\MailTested; use Pterodactyl\Providers\SettingsServiceProvider; use Illuminate\Contracts\Config\Repository as ConfigRepository; use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface; @@ -129,10 +131,12 @@ class MailController extends Controller ->notify(new MailTested($request->user())); } catch (Exception $exception) { $this->alert->danger(trans('base.mail.test_failed'))->flash(); + return redirect()->route('admin.settings.mail'); } $this->alert->success(trans('base.mail.test_succeeded'))->flash(); + return redirect()->route('admin.settings.mail'); } } diff --git a/app/Notifications/MailTested.php b/app/Notifications/MailTested.php index 179666db3..fdb95f5cb 100644 --- a/app/Notifications/MailTested.php +++ b/app/Notifications/MailTested.php @@ -2,9 +2,9 @@ namespace Pterodactyl\Notifications; -use Illuminate\Notifications\Messages\MailMessage; -use Illuminate\Notifications\Notification; use Pterodactyl\Models\User; +use Illuminate\Notifications\Notification; +use Illuminate\Notifications\Messages\MailMessage; class MailTested extends Notification { @@ -13,7 +13,8 @@ class MailTested extends Notification */ private $user; - public function __construct(User $user) { + public function __construct(User $user) + { $this->user = $user; }