Completed
Push — master ( e7bbff...d995c3 )
by Dmitry
54s
created

HostingSidebarMenuCest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
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 17
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A ensureMenuIsOk() 14 14 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 hipanel\modules\hosting\tests\acceptance\admin;
4
5
use hipanel\tests\_support\Page\SidebarMenu;
6
use hipanel\tests\_support\Step\Acceptance\Admin;
7
8 View Code Duplication
class HostingSidebarMenuCest
0 ignored issues
show
Duplication introduced by pkolomiy
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...
9
{
10
    public function ensureMenuIsOk(Admin $I)
11
    {
12
        (new SidebarMenu($I))->ensureContains('Hosting',[
13
            'Accounts' => '@account/index',
14
            'Databases' => '@db/index',
15
            'Domains' => '@hdomain/index',
16
            'Mailboxes' => '@mail/index',
17
            'Backups' => '@backuping/index',
18
            'Crons' => '@crontab/index',
19
            'IP addresses' => '@ip/index',
20
            'Services' => '@service/index',
21
            'Requests' => '@request/index',
22
        ]);
23
    }
24
}
25