These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
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\Front; |
||
15 | |||
16 | View Code Duplication | class CustomerAddressAddPage extends AbstractFrontPage |
|
0 ignored issues
–
show
|
|||
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 | $page->tester->see('お届け先の追加', 'div.ec-pageHeader h1'); |
||
27 | |||
28 | return $page; |
||
29 | } |
||
30 | |||
31 | public function 入力_姓($value) |
||
32 | { |
||
33 | $this->tester->fillField(['id' => 'shopping_shipping_name_name01'], $value); |
||
34 | |||
35 | return $this; |
||
36 | } |
||
37 | |||
38 | public function 入力_名($value) |
||
39 | { |
||
40 | $this->tester->fillField(['id' => 'shopping_shipping_name_name02'], $value); |
||
41 | |||
42 | return $this; |
||
43 | } |
||
44 | |||
45 | public function 入力_セイ($value) |
||
46 | { |
||
47 | $this->tester->fillField(['id' => 'shopping_shipping_kana_kana01'], $value); |
||
48 | |||
49 | return $this; |
||
50 | } |
||
51 | |||
52 | public function 入力_メイ($value) |
||
53 | { |
||
54 | $this->tester->fillField(['id' => 'shopping_shipping_kana_kana02'], $value); |
||
55 | |||
56 | return $this; |
||
57 | } |
||
58 | |||
59 | public function 入力_郵便番号($value) |
||
60 | { |
||
61 | $this->tester->fillField(['id' => 'shopping_shipping_postal_code'], $value); |
||
62 | |||
63 | return $this; |
||
64 | } |
||
65 | |||
66 | public function 入力_都道府県($value) |
||
67 | { |
||
68 | $this->tester->selectOption(['id' => 'shopping_shipping_address_pref'], $value); |
||
69 | |||
70 | return $this; |
||
71 | } |
||
72 | |||
73 | public function 入力_市区町村名($value) |
||
74 | { |
||
75 | $this->tester->fillField(['id' => 'shopping_shipping_address_addr01'], $value); |
||
76 | |||
77 | return $this; |
||
78 | } |
||
79 | |||
80 | public function 入力_番地_ビル名($value) |
||
81 | { |
||
82 | $this->tester->fillField(['id' => 'shopping_shipping_address_addr02'], $value); |
||
83 | |||
84 | return $this; |
||
85 | } |
||
86 | |||
87 | public function 入力_電話番号($value) |
||
88 | { |
||
89 | $this->tester->fillField(['id' => 'shopping_shipping_phone_number'], $value); |
||
90 | |||
91 | return $this; |
||
92 | } |
||
93 | |||
94 | public function 登録する() |
||
95 | { |
||
96 | $this->tester->click('div.ec-registerRole button.ec-blockBtn--action'); |
||
97 | } |
||
98 | } |
||
99 |
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.