Auth::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 2
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Routes;
4
5
use CoffeeCode\Router\Router;
6
use ThallesDella\FactoryRouter\Routes;
7
8
/**
9
 * Factory Router | Class Auth [ EXAMPLE ]
10
 *
11
 * @category FactoryRouter\Examples\Routes
12
 * @package  Routes
13
 * @author   Thalles D. koester <[email protected]>
14
 * @license  https://choosealicense.com/licenses/mit/ MIT
15
 * @link     https://github.com/thallesdella/factory-router
16
 */
17
class Auth extends Routes
18
{
19
    /**
20
     * Auth constructor.
21
     *
22
     * @param Router $router Router object
23
     */
24
    public function __construct(Router $router)
25
    {
26
        parent::__construct($router, 'Auth');
27
        $this->namespace('Controllers\Auth');
28
    }
29
    
30
    /**
31
     * @return Router
32
     */
33
    public function updateRouter(): Router
34
    {
35
        $this->group('auth');
36
    
37
        $this->post('/login', 'login');
38
        
39
        return $this->router;
40
    }
41
}