Conditions | 4 |
Paths | 8 |
Total Lines | 19 |
Code Lines | 6 |
Lines | 4 |
Ratio | 21.05 % |
Changes | 0 |
1 | <?php |
||
11 | |||
12 | use Modules\Install, Utils\Schema; |
||
13 | |||
14 | class Installer { |
||
15 | |||
16 | /** |
||
17 | * Route a request to a handler |
||
18 | */ |
||
19 | |||
20 | public function route() { |
||
21 | |||
22 | # Check installation |
||
23 | |||
24 | View Code Duplication | if (null !== ($data = Schema::get('System')->load())) { |
|
|
|||
25 | |||
26 | Request::redirect(INSTALL_PATH . '/index.php'); |
||
27 | } |
||
28 | |||
29 | # Get handler class |
||
30 | |||
41 |
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.