GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — develop ( 9e9d51...fc7292 )
by Borut
03:13
created

ToolsControllerProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 41
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B connect() 33 33 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
namespace Application\ControllerProvider\MembersArea;
4
5
use Silex\Application;
6
use Silex\ControllerProviderInterface;
7
8
/**
9
 * @author Borut Balažek <[email protected]>
10
 */
11 View Code Duplication
class ToolsControllerProvider implements ControllerProviderInterface
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...
12
{
13
    /**
14
     * @param Application $app
15
     *
16
     * @return \Silex\ControllerCollection
17
     */
18
    public function connect(Application $app)
19
    {
20
        $controllers = $app['controllers_factory'];
21
22
        $controllers->match(
23
            '',
24
            'Application\Controller\MembersArea\ToolsController::indexAction'
25
        )
26
        ->bind('members-area.tools');
27
28
        /***** Email *****/
29
        $controllers->match(
30
            '/email',
31
            'Application\Controller\MembersArea\Tools\EmailController::indexAction'
32
        )
33
        ->bind('members-area.tools.email');
34
35
        /*** Preview Templates ***/
36
        $controllers->match(
37
            '/email/preview-templates',
38
            'Application\Controller\MembersArea\Tools\EmailController::previewTemplatesAction'
39
        )
40
        ->bind('members-area.tools.email.preview-templates');
41
42
        /***** Database backups *****/
43
        $controllers->match(
44
            '/database-backup',
45
            'Application\Controller\MembersArea\ToolsController::databaseBackupAction'
46
        )
47
        ->bind('members-area.tools.database-backup');
48
49
        return $controllers;
50
    }
51
}
52