Passed
Push — feature/job-builder/step-03 ( c9515d...117b8c )
by Yonathan
12:37
created

AuthController::auth_routes()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 24
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 2.1922

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 24
ccs 7
cts 11
cp 0.6364
rs 9.7666
c 0
b 0
f 0
cc 2
nc 2
nop 0
crap 2.1922
1
<?php
2
3
namespace App\Http\Controllers\Auth;
4
5
use App\Http\Controllers\Controller;
6
use Facades\App\Services\WhichPortal;
7
8
class AuthController extends Controller
9
{
10
    /**
11
     * Sets the route namespace based on the logged in user.
12
     *
13
     * @return mixed[]
14
     */
15 3
    protected function auth_routes()
0 ignored issues
show
Coding Style introduced by
Method name "AuthController::auth_routes" is not in camel caps format
Loading history...
16
    {
17 3
        if (WhichPortal::isManagerPortal()) {
18
            $routes = [
19
                'login' => route('manager.login'),
20
                'register' => route('manager.register'),
21
                'password' => [
22
                    'email' => route('manager.password.email'),
23
                    'request' => route('manager.password.request'),
24
                ],
25
                //'passwords.reset' => route('manager.password.reset'),
0 ignored issues
show
Coding Style introduced by
No space found before comment text; expected "// 'passwords.reset' => route('manager.password.reset')," but found "//'passwords.reset' => route('manager.password.reset'),"
Loading history...
26
            ];
27
        } else {
28
            $routes = [
29 3
                'login' => route('login'),
30 3
                'register' => route('register'),
31
                'password' => [
32 3
                    'email' => route('password.email'),
33 3
                    'request' => route('password.request'),
34
                ],
35
                //'passwords.reset' => route('password.reset'),
0 ignored issues
show
Coding Style introduced by
No space found before comment text; expected "// 'passwords.reset' => route('password.reset')," but found "//'passwords.reset' => route('password.reset'),"
Loading history...
36
            ];
37
        }
38 3
        return $routes;
39
    }
40
}
41