Completed
Push — 4.0 ( 268f2c...88f012 )
by Hideki
05:48 queued 10s
created

PaymentEditPage   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 42
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 42
loc 42
rs 10
c 0
b 0
f 0
wmc 6
lcom 0
cbo 1

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 4 4 1
A at() 6 6 1
A 入力_支払方法() 6 6 1
A 入力_手数料() 6 6 1
A 入力_利用条件下限() 6 6 1
A 登録() 4 4 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) EC-CUBE CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.ec-cube.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 View Code Duplication
class PaymentEditPage extends AbstractAdminPageStyleGuide
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...
17
{
18
    public static $登録完了メッセージ = '.c-container .c-contentsArea div.alert-success';
19
20
    public function __construct(\AcceptanceTester $I)
21
    {
22
        parent::__construct($I);
23
    }
24
25
    public static function at($I)
26
    {
27
        $page = new self($I);
28
29
        return $page->atPage('支払方法設定店舗設定');
30
    }
31
32
    public function 入力_支払方法($value)
33
    {
34
        $this->tester->fillField(['id' => 'payment_register_method'], $value);
35
36
        return $this;
37
    }
38
39
    public function 入力_手数料($value)
40
    {
41
        $this->tester->fillField(['id' => 'payment_register_charge'], $value);
42
43
        return $this;
44
    }
45
46
    public function 入力_利用条件下限($value)
47
    {
48
        $this->tester->fillField(['id' => 'payment_register_rule_min'], $value);
49
50
        return $this;
51
    }
52
53
    public function 登録()
54
    {
55
        $this->tester->click('#form1 > .c-conversionArea > .c-conversionArea__container button.btn-ec-conversion');
56
    }
57
}
58