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 | class MultipleShippingPage extends AbstractFrontPage |
||
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 新規お届け先を追加する() |
||
32 | { |
||
33 | $this->tester->click('#shipping-multiple-form > div.ec-AddAddress__new > a'); |
||
34 | |||
35 | return $this; |
||
36 | } |
||
37 | |||
38 | public function お届け先追加() |
||
39 | { |
||
40 | $this->tester->click('#button__add0'); |
||
41 | |||
42 | return $this; |
||
43 | } |
||
44 | |||
45 | View Code Duplication | public function 入力_お届け先($productNo, $shippingNo, $text) |
|
0 ignored issues
–
show
|
|||
46 | { |
||
47 | $id = 'form_shipping_multiple_'.$productNo.'_shipping_'.$shippingNo.'_customer_address'; |
||
48 | $this->tester->selectOption(['id' => $id], ['text' => $text]); |
||
49 | |||
50 | return $this; |
||
51 | } |
||
52 | |||
53 | View Code Duplication | public function 入力_数量($productNo, $shippingNo, $value) |
|
0 ignored issues
–
show
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. ![]() |
|||
54 | { |
||
55 | $id = 'form_shipping_multiple_'.$productNo.'_shipping_'.$shippingNo.'_quantity'; |
||
56 | $this->tester->fillField(['id' => $id], $value); |
||
57 | |||
58 | return $this; |
||
59 | } |
||
60 | |||
61 | public function 選択したお届け先に送る() |
||
62 | { |
||
63 | $this->tester->click('#button__confirm'); |
||
64 | |||
65 | return $this; |
||
66 | } |
||
67 | } |
||
68 |
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.