Completed
Push — dev ( 760621...2233d0 )
by Tristan
09:27 queued 03:33
created

Authenticate   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 14
c 0
b 0
f 0
ccs 0
cts 4
cp 0
rs 10
1
<?php
2
namespace App\Http\Middleware;
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
use Illuminate\Auth\Middleware\Authenticate as Middleware;
4
use Facades\App\Services\WhichPortal;
5
6
class Authenticate extends Middleware
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class Authenticate
Loading history...
7
{
8
    /**
9
    * Get the path the user should be redirected to when they are not authenticated.
0 ignored issues
show
Coding Style introduced by
Expected 5 space(s) before asterisk; 4 found
Loading history...
10
    *
0 ignored issues
show
Coding Style introduced by
Expected 5 space(s) before asterisk; 4 found
Loading history...
11
    * @param  \Illuminate\Http\Request  $request
0 ignored issues
show
Coding Style introduced by
Expected 5 space(s) before asterisk; 4 found
Loading history...
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter type; 2 found
Loading history...
12
    * @return string
0 ignored issues
show
Coding Style introduced by
Expected 5 space(s) before asterisk; 4 found
Loading history...
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
13
    */
0 ignored issues
show
Coding Style introduced by
Expected 5 space(s) before asterisk; 4 found
Loading history...
14
    protected function redirectTo($request)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

14
    protected function redirectTo(/** @scrutinizer ignore-unused */ $request)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
15
    {
16
        if (WhichPortal::isManagerPortal()) {
17
            return route('manager.login');
18
        } else {
19
            return route('login');
20
        }            
21
    }
22
}
23