Completed
Push — master ( 906f5a...709e36 )
by Phecho
03:29
created

ExploreRoutes   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 24
loc 24
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A map() 16 16 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
/*
4
 * This file is part of Gitamin.
5
 * 
6
 * Copyright (C) 2015-2016 The Gitamin Team
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Gitamin\Http\Routes;
13
14
use Illuminate\Contracts\Routing\Registrar;
15
16
/**
17
 * This is the explore routes class.
18
 */
19 View Code Duplication
class ExploreRoutes
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
20
{
21
    /**
22
     * Define the explore routes.
23
     *
24
     * @param \Illuminate\Contracts\Routing\Registrar $router
25
     */
26
    public function map(Registrar $router)
27
    {
28
        $router->group([
29
            'middleware' => ['app.hasSetting'],
30
            'setting'    => 'app_name',
31
            'prefix'     => 'explore',
32
            'as'         => 'explore.',
33
        ], function ($router) {
34
            $router->get('/', [
35
                'as'   => 'index',
36
                'uses' => 'Explore\\ExploreController@index',
37
            ]);
38
39
            
40
        });
41
    }
42
}
43