Routes   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 68.75 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 11
loc 16
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 11 11 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
 * Routes
5
 * @copyright Copyright (c) 2011 - 2014 Aleksandr Torosh (http://wezoom.com.ua)
6
 * @author Aleksandr Torosh <[email protected]>
7
 */
8
9
namespace Index;
10
11
class Routes
12
{
13
14 View Code Duplication
    public function init($router)
15
    {
16
        $router->addML('/', array(
17
            'module' => 'index',
18
            'controller' => 'index',
19
            'action' => 'index',
20
        ), 'index');
21
22
        return $router;
23
24
    }
25
26
}