Completed
Push — master ( 27a761...fea4e1 )
by Abdelrahman
01:44 queued 10s
created

Authenticate::redirectTo()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Auth\Http\Middleware;
6
7
use Illuminate\Auth\Middleware\Authenticate as BaseAuthenticate;
8
9
class Authenticate extends BaseAuthenticate
10
{
11
    /**
12
     * Get the path the user should be redirected to when they are not authenticated.
13
     *
14
     * @param  \Illuminate\Http\Request  $request
15
     * @return string
0 ignored issues
show
Documentation introduced by
Should the return type not be string|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
16
     */
17
    protected function redirectTo($request)
18
    {
19
        if (! $request->expectsJson()) {
20
            return route('frontarea.login');
21
        }
22
    }
23
}
24