Authenticate   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A redirectTo() 0 6 2
1
<?php
2
3
namespace App\Http\Middleware;
4
5
use Illuminate\Auth\Middleware\Authenticate as Middleware;
6
7
class Authenticate extends Middleware
8
{
9
    /**
10
     * Get the path the user should be redirected to when they are not authenticated.
11
     *
12
     * @param  \Illuminate\Http\Request  $request
13
     * @return string
14
     */
15
    protected function redirectTo($request)
16
    {
17
        if (! $request->expectsJson()) {
18
            return route('login');
19
        }
20
    }
21
}
22