styleci tweaks

This commit is contained in:
ayan4m1 2018-09-15 19:59:07 -04:00
parent ace58dd1df
commit 670efa3544
2 changed files with 11 additions and 6 deletions

View file

@ -3,16 +3,18 @@
namespace Pterodactyl\Http\Controllers\Admin\Settings; namespace Pterodactyl\Http\Controllers\Admin\Settings;
use Exception; use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Notification;
use Illuminate\View\View; use Illuminate\View\View;
use Illuminate\Http\Request;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Prologue\Alerts\AlertsMessageBag; use Prologue\Alerts\AlertsMessageBag;
use Illuminate\Contracts\Console\Kernel; use Illuminate\Contracts\Console\Kernel;
use Pterodactyl\Notifications\MailTested;
use Illuminate\Support\Facades\Notification;
use Pterodactyl\Exceptions\DisplayException; use Pterodactyl\Exceptions\DisplayException;
use Pterodactyl\Http\Controllers\Controller; use Pterodactyl\Http\Controllers\Controller;
use Illuminate\Contracts\Encryption\Encrypter; use Illuminate\Contracts\Encryption\Encrypter;
use Pterodactyl\Notifications\MailTested;
use Pterodactyl\Providers\SettingsServiceProvider; use Pterodactyl\Providers\SettingsServiceProvider;
use Illuminate\Contracts\Config\Repository as ConfigRepository; use Illuminate\Contracts\Config\Repository as ConfigRepository;
use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface; use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface;
@ -129,10 +131,12 @@ class MailController extends Controller
->notify(new MailTested($request->user())); ->notify(new MailTested($request->user()));
} catch (Exception $exception) { } catch (Exception $exception) {
$this->alert->danger(trans('base.mail.test_failed'))->flash(); $this->alert->danger(trans('base.mail.test_failed'))->flash();
return redirect()->route('admin.settings.mail'); return redirect()->route('admin.settings.mail');
} }
$this->alert->success(trans('base.mail.test_succeeded'))->flash(); $this->alert->success(trans('base.mail.test_succeeded'))->flash();
return redirect()->route('admin.settings.mail'); return redirect()->route('admin.settings.mail');
} }
} }

View file

@ -2,9 +2,9 @@
namespace Pterodactyl\Notifications; namespace Pterodactyl\Notifications;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Pterodactyl\Models\User; use Pterodactyl\Models\User;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class MailTested extends Notification class MailTested extends Notification
{ {
@ -13,7 +13,8 @@ class MailTested extends Notification
*/ */
private $user; private $user;
public function __construct(User $user) { public function __construct(User $user)
{
$this->user = $user; $this->user = $user;
} }