Completed
Push — master ( e40024...27a431 )
by ARCANEDEV
03:09
created

ProfileRoutes   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
c 3
b 0
f 0
lcom 1
cbo 1
dl 0
loc 34
ccs 19
cts 19
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A map() 0 22 1
1
<?php namespace Arcanesoft\Auth\Http\Routes\Foundation;
2
3
use Arcanedev\Support\Bases\RouteRegister;
4
use Illuminate\Contracts\Routing\Registrar;
5
6
/**
7
 * Class     ProfileRoutes
8
 *
9
 * @package  Arcanesoft\Auth\Http\Routes\Foundation
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class ProfileRoutes extends RouteRegister
13
{
14
    /* ------------------------------------------------------------------------------------------------
15
     |  Main Functions
16
     | ------------------------------------------------------------------------------------------------
17
     */
18
    /**
19
     * Map routes.
20
     *
21
     * @param  \Illuminate\Contracts\Routing\Registrar  $router
22
     */
23 24
    public function map(Registrar $router)
24
    {
25 24
        $this->group([
26 24
            'prefix'    => 'profile',
27 18
            'as'        => 'profile.',
28
        ], function () {
29 24
            $this->get('/', [
30 24
                'as'   => 'index',           // auth::foundation.profile.index
31 18
                'uses' => 'ProfileController@index',
32 18
            ]);
33
34 24
            $this->group([
35 24
                'prefix' => '{user_id}/password',
36 18
                'as'     => 'password.',
37 24
            ], function () {
38 24
                $this->put('/', [
39 24
                    'as'   => 'update', // auth::foundation.profile.password.update
40 18
                    'uses' => 'ProfileController@updatePassword',
41 18
                ]);
42 24
            });
43 24
        });
44 24
    }
45
}
46