| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 63 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php  | 
            ||
| 39 | public function top_001(\AcceptanceTester $I)  | 
            ||
| 40 |     { | 
            ||
| 41 |         $I->wantTo('EA0101-UC01-T01 TOPページ 初期表示'); | 
            ||
| 42 | |||
| 43 | // TOP画面に現在の受注状況、お知らせ、売り上げ状況、ショップ状況が表示されている  | 
            ||
| 44 |         $I->see('新規受付', TopPage::$受付状況_新規受付); | 
            ||
| 45 |         $I->see('お知らせ', TopPage::$お知らせ); | 
            ||
| 46 |         $I->see('売上状況', TopPage::$売上状況); | 
            ||
| 47 |         $I->see('ショップ状況', TopPage::$ショップ状況); | 
            ||
| 48 | |||
| 49 | // 新規受付をクリックすると受注管理画面に遷移することを確認  | 
            ||
| 50 | $I->click(TopPage::$受付状況_新規受付);  | 
            ||
| 51 |         $I->see('受注一覧', self::ページタイトル); | 
            ||
| 52 | $I->goToAdminPage();  | 
            ||
| 53 | |||
| 54 | // 購入された商品が受注管理画面のページにて反映されていることを確認  | 
            ||
| 55 |         $config = Fixtures::get('config'); | 
            ||
| 56 |         $findOrders = Fixtures::get('findOrders'); | 
            ||
| 57 |         $NewOrders = array_filter($findOrders(), function ($Order) use ($config) { | 
            ||
| 58 | return $Order->getOrderStatus()->getId() == \Eccube\Entity\Master\OrderStatus::NEW;  | 
            ||
| 59 | });  | 
            ||
| 60 | $I->see(count($NewOrders), TopPage::$受付状況_新規受付数);  | 
            ||
| 61 | |||
| 62 | // FIXME [issue] ソート順が指定されていないのでテストが失敗する  | 
            ||
| 63 | // https://github.com/EC-CUBE/ec-cube/issues/1908  | 
            ||
| 64 | // // 入金待ちをクリックすると「受注管理>入金待ち」のページに遷移することを確認  | 
            ||
| 65 | // $I->click(TopPage::$受付状況_入金待ち);  | 
            ||
| 66 |         // $I->see('受注一覧', self::ページタイトル); | 
            ||
| 67 | // $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '2'/*入金待ち*/);  | 
            ||
| 68 | // $I->goToAdminPage();  | 
            ||
| 69 | //  | 
            ||
| 70 | // // 入金済みをクリックすると「受注管理>入金済み」のページに遷移することを確認  | 
            ||
| 71 | // $I->click(TopPage::$受付状況_入金済み);  | 
            ||
| 72 |         // $I->see('受注一覧', self::ページタイトル); | 
            ||
| 73 | // $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '6'/*入金済み*/);  | 
            ||
| 74 | // $I->goToAdminPage();  | 
            ||
| 75 | //  | 
            ||
| 76 | // // 取り寄せ中をクリックすると「受注管理>取り寄せ」のページに遷移することを確認  | 
            ||
| 77 | // $I->click(TopPage::$受付状況_取り寄せ中);  | 
            ||
| 78 |         // $I->see('受注一覧', self::ページタイトル); | 
            ||
| 79 | // $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '4'/*取り寄せ中*/);  | 
            ||
| 80 | // $I->goToAdminPage();  | 
            ||
| 81 | |||
| 82 | // お知らせの記事をクリックすると設定されたURLに遷移することを確認  | 
            ||
| 83 |         $I->switchToIFrame('information'); | 
            ||
| 84 | $selector = '.news_area .link_list .tableish a:nth-child(1)';  | 
            ||
| 85 | $url = $I->grabAttributeFrom($selector, 'href');  | 
            ||
| 86 | $I->click(['css' => $selector]);  | 
            ||
| 87 | $I->switchToNewWindow();  | 
            ||
| 88 |         $I->assertEquals($url, $I->executeJS('return location.href'), $url.' が一致しません'); | 
            ||
| 89 | $I->switchToWindow();  | 
            ||
| 90 | |||
| 91 | // ショップ情報の在庫切れ商品をクリックすると商品管理ページに遷移することを確認  | 
            ||
| 92 | $I->click(TopPage::$ショップ状況_在庫切れ商品);  | 
            ||
| 93 |         $x = $I->executeJS('return document.documentElement.outerHTML'); | 
            ||
| 94 | var_dump($x);  | 
            ||
| 95 |         $I->see('商品一覧', self::ページタイトル); | 
            ||
| 96 | $I->goToAdminPage();  | 
            ||
| 97 | |||
| 98 | // ショップ情報の会員数をクリックすると会員管理に遷移することを確認  | 
            ||
| 99 | $I->click(TopPage::$ショップ状況_会員数);  | 
            ||
| 100 |         $I->see('会員一覧', self::ページタイトル); | 
            ||
| 101 | }  | 
            ||
| 102 | }  | 
            ||
| 103 | 
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.