Skip to content

Commit

Permalink
Apply fixes from StyleCI (#6)
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
codedge authored Sep 23, 2020
1 parent 3fee177 commit 7883817
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Http/Controllers/Cp/Auth/MagicLinkLoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public function login(Request $request)
* the protected content feature.
*/
$user = User::findByEmail($request->get('user_email'));
if($user !== null) {
if ($user !== null) {
Auth::guard('web')->login($user);
}

$redirect = !empty($this->magicLinkManager->get()->get($user->email())['redirect_to'])
$redirect = ! empty($this->magicLinkManager->get()->get($user->email())['redirect_to'])
? route($this->magicLinkManager->get()->get($user->email())['redirect_to'])
: cp_route(config('statamic-magiclink.url.redirect_on_success'));

Expand Down
1 change: 0 additions & 1 deletion src/Http/Controllers/Cp/LinksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use Carbon\Carbon;
use Codedge\MagicLink\MagicLinkManager;
use Illuminate\Http\Request;
use Statamic\CP\Column;

final class LinksController extends BaseCpController
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Middleware/MagicLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function handle(Request $request, Closure $next)
{
$previousRoute = $request->create(url()->previous());

if($request->has('referer')) {
if ($request->has('referer')) {
$previousRoute = $request->create($request->get('referer'));
}

Expand Down
2 changes: 0 additions & 2 deletions src/MagicLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Codedge\MagicLink;

use Carbon\Carbon;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\URL;
use Statamic\Contracts\Auth\User;

Expand All @@ -19,7 +18,6 @@ final class MagicLink
/**
* Redirect to the page after a successful login. This is either the CP dashboard or a page with protected
* content.
*
*/
protected string $redirectTo;
protected string $link;
Expand Down

0 comments on commit 7883817

Please sign in to comment.