Completed
Push — 4.0 ( 103006...239d44 )
by Ryo
05:55
created

PluginStoreInstallPage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 33.33 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 10
loc 30
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 2

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A at() 0 6 1
A インストール() 10 10 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 EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Page\Admin;
15
16
class PluginStoreInstallPage extends AbstractAdminPageStyleGuide
17
{
18
    public function __construct(\AcceptanceTester $I)
19
    {
20
        parent::__construct($I);
21
    }
22
23
    public static function at($I)
24
    {
25
        $page = new self($I);
26
27
        return $page->atPage('インストール確認 オーナーズストア');
28
    }
29
30
    /**
31
     * @return PluginManagePage
32
     *
33
     * @throws \Exception
34
     */
35 View Code Duplication
    public function インストール()
0 ignored issues
show
Duplication introduced by
This method 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...
36
    {
37
        $this->tester->click(['css' => '#plugin-list > div.card-body > div:nth-child(2) > div > button.btn.btn-primary']);
38
        $this->tester->waitForElementVisible(['id' => 'installBtn']);
39
        $this->tester->click(['id' => 'installBtn']);
40
        $this->tester->waitForElementVisible(['css' => '#installModal > div > div > div.modal-footer > a'], 30);
41
        $this->tester->click(['css' => '#installModal > div > div > div.modal-footer > a']);
42
43
        return PluginManagePage::at($this->tester);
44
    }
45
}
46