Completed
Pull Request — experimental/sf (#3157)
by Kentaro
151:58 queued 143:16
created
codeception/acceptance/EF02ProductCest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
         ProductDetailPage::go($I, 2);
141 141
 
142 142
         // 「カートに入れる」ボタンが、非活性となり「ただいま品切れ中です」と表示される。
143
-        $I->see('ただいま品切れ中です','#form1 button');
143
+        $I->see('ただいま品切れ中です', '#form1 button');
144 144
     }
145 145
 
146 146
     public function product_商品詳細カテゴリリンク(\AcceptanceTester $I)
Please login to merge, or discard this patch.
codeception/acceptance/EA03ProductCest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         $I->wantTo('EA0310-UC02-T02 一覧からの規格編集 規格あり2');
196 196
 
197 197
         $findProducts = Fixtures::get('findProducts');
198
-        $Products = array_filter($findProducts(), function ($Product) {
198
+        $Products = array_filter($findProducts(), function($Product) {
199 199
             return $Product->hasProductClass();
200 200
         });
201 201
         $Product = array_pop($Products);
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         $I->wantTo('EA0310-UC05-T02 一覧からの商品複製');
218 218
 
219 219
         $findProducts = Fixtures::get('findProducts');
220
-        $Products = array_filter($findProducts(), function ($Product) {
220
+        $Products = array_filter($findProducts(), function($Product) {
221 221
             return $Product->hasProductClass();
222 222
         });
223 223
         $Product = array_pop($Products);
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $I->wantTo('EA0310-UC02-T01 一覧からの規格編集 規格あり1');
237 237
 
238 238
         $findProducts = Fixtures::get('findProducts');
239
-        $Products = array_filter($findProducts(), function ($Product) {
239
+        $Products = array_filter($findProducts(), function($Product) {
240 240
             return $Product->hasProductClass();
241 241
         });
242 242
         $Product = array_pop($Products);
Please login to merge, or discard this patch.
codeception/acceptance/_bootstrap.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 use Faker\Factory as Faker;
10 10
 
11 11
 
12
-$config = parse_ini_file(__DIR__.'/config.ini',true);
12
+$config = parse_ini_file(__DIR__.'/config.ini', true);
13 13
 
14 14
 /**
15 15
  * create fixture
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 $progress = (function()
40 40
 {
41 41
     $current = '';
42
-    return function ($key) use (&$current) {
42
+    return function($key) use (&$current) {
43 43
         if ($current !== $key) {
44 44
             if ($current !== '') {
45 45
                 echo PHP_EOL;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     ->getQuery()
74 74
     ->getSingleScalarResult();
75 75
 // 受注生成件数 + 初期データの商品が生成されているはず
76
-if ($num < ($config['fixture_product_num']+2)) {
76
+if ($num < ($config['fixture_product_num'] + 2)) {
77 77
     // 規格なしも含め $config['fixture_product_num'] の分だけ生成する
78 78
     for ($i = 0; $i < $config['fixture_product_num'] - 1; $i++) {
79 79
         $progress('Generating Products');
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
  */
162 162
 
163 163
 /** 管理画面アカウント情報. */
164
-Fixtures::add('admin_account',array(
164
+Fixtures::add('admin_account', array(
165 165
     'member' => $config['admin_user'],
166 166
     'password' => $config['admin_password'],
167 167
 ));
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 /** カテゴリ一覧の配列. */
183 183
 Fixtures::add('categories', $categories);
184 184
 
185
-$findOrders = function () use ($entityManager) {
185
+$findOrders = function() use ($entityManager) {
186 186
     return $entityManager->getRepository('Eccube\Entity\Order')
187 187
     ->createQueryBuilder('o')
188 188
     ->getQuery()
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 /** 受注を検索するクロージャ. */
192 192
 Fixtures::add('findOrders', $findOrders);
193 193
 
194
-$findShippings = function () use ($entityManager) {
194
+$findShippings = function() use ($entityManager) {
195 195
     return $entityManager->getRepository('Eccube\Entity\Shipping')
196 196
     ->createQueryBuilder('o')
197 197
     ->getQuery()
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 /** 出荷を検索するクロージャ. */
201 201
 Fixtures::add('findShippings', $findShippings);
202 202
 
203
-$resetShippingStatusPrepared = function () use ($entityManager) {
203
+$resetShippingStatusPrepared = function() use ($entityManager) {
204 204
     $StatusPrepared = $entityManager->find(ShippingStatus::class, ShippingStatus::PREPARED);
205 205
     $Shippings = $entityManager->getRepository('Eccube\Entity\Shipping')
206 206
         ->findAll();
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 /** 出荷準備中に更新するクロージャ. */
214 214
 Fixtures::add('resetShippingStatusPrepared', $resetShippingStatusPrepared);
215 215
 
216
-$resetShippingStatusShipped = function () use ($entityManager) {
216
+$resetShippingStatusShipped = function() use ($entityManager) {
217 217
     $StatusShipped = $entityManager->find(ShippingStatus::class, ShippingStatus::SHIPPED);
218 218
     $Shippings = $entityManager->getRepository('Eccube\Entity\Shipping')
219 219
         ->findAll();
@@ -226,9 +226,9 @@  discard block
 block discarded – undo
226 226
 /** 出荷済みに更新するクロージャ. */
227 227
 Fixtures::add('resetShippingStatusShipped', $resetShippingStatusShipped);
228 228
 
229
-$deleteShippingNotExistsOfItem = function () use ($entityManager) {
229
+$deleteShippingNotExistsOfItem = function() use ($entityManager) {
230 230
 
231
-    $Shippings= $entityManager->getRepository('Eccube\Entity\Shipping')->findAll();
231
+    $Shippings = $entityManager->getRepository('Eccube\Entity\Shipping')->findAll();
232 232
 
233 233
     if ($Shippings) {
234 234
         foreach ($Shippings as $Shipping) {
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 /** OrderItemの存在しない出荷を削除するクロージャ. */
245 245
 Fixtures::add('deleteShippingNotExistsOfItem', $deleteShippingNotExistsOfItem);
246 246
 
247
-$findProducts = function () use ($entityManager) {
247
+$findProducts = function() use ($entityManager) {
248 248
     return $entityManager->getRepository('Eccube\Entity\Product')
249 249
         ->createQueryBuilder('p')
250 250
         ->getQuery()
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 };
259 259
 Fixtures::add('createProduct', $createProduct);
260 260
 
261
-$createCustomer = function ($email = null, $active = true) use ($container, $faker) {
261
+$createCustomer = function($email = null, $active = true) use ($container, $faker) {
262 262
     if (is_null($email)) {
263 263
         $email = microtime(true).'.'.$faker->safeEmail;
264 264
     }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 /** 会員を生成するクロージャ. */
268 268
 Fixtures::add('createCustomer', $createCustomer);
269 269
 
270
-$createOrders = function ($Customer, $numberOfOrders = 5, $ProductClasses = array()) use ($container, $entityManager, $faker) {
270
+$createOrders = function($Customer, $numberOfOrders = 5, $ProductClasses = array()) use ($container, $entityManager, $faker) {
271 271
     $generator = $container->get('Eccube\Tests\Fixture\Generator');
272 272
     $Orders = array();
273 273
     for ($i = 0; $i < $numberOfOrders; $i++) {
@@ -285,19 +285,19 @@  discard block
 block discarded – undo
285 285
 /** 受注を生成するクロージャ. */
286 286
 Fixtures::add('createOrders', $createOrders);
287 287
 
288
-$findPlugins = function () use ($entityManager) {
288
+$findPlugins = function() use ($entityManager) {
289 289
     return $entityManager->getRepository('Eccube\Entity\Plugin')->findAll();
290 290
 };
291 291
 /** プラグインを検索するクロージャ */
292 292
 Fixtures::add('findPlugins', $findPlugins);
293 293
 
294
-$findPluginByCode = function ($code = null) use ($entityManager) {
294
+$findPluginByCode = function($code = null) use ($entityManager) {
295 295
     return $entityManager->getRepository('Eccube\Entity\Plugin')->findOneBy(['code' => $code]);
296 296
 };
297 297
 /** プラグインを検索するクロージャ */
298 298
 Fixtures::add('findPluginByCode', $findPluginByCode);
299 299
 
300
-$findCustomers = function () use ($entityManager) {
300
+$findCustomers = function() use ($entityManager) {
301 301
     return $entityManager->getRepository('Eccube\Entity\Customer')
302 302
         ->createQueryBuilder('c')
303 303
         ->getQuery()
@@ -307,13 +307,13 @@  discard block
 block discarded – undo
307 307
 Fixtures::add('findCustomers', $findCustomers);
308 308
 
309 309
 /** 新着情報を検索するクロージャ */
310
-Fixtures::add('findNews', function () use ($entityManager) {
310
+Fixtures::add('findNews', function() use ($entityManager) {
311 311
     return $entityManager->getRepository(\Eccube\Entity\News::class)
312 312
         ->findBy([], ['sort_no' => 'DESC']);
313 313
 });
314 314
 
315 315
 /** 新着情報を登録するクロージャ */
316
-Fixtures::add('createNews', function ($publishDate, $title, $description, $url = null) use ($entityManager) {
316
+Fixtures::add('createNews', function($publishDate, $title, $description, $url = null) use ($entityManager) {
317 317
     $TopNews = $entityManager->getRepository(\Eccube\Entity\News::class)
318 318
         ->findOneBy([], ['sort_no' => 'DESC']);
319 319
     $sortNo = $TopNews ? $TopNews->getSortNo() + 1 : 1;
Please login to merge, or discard this patch.
codeception/acceptance/EA04OrderCest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $I->wantTo('EA0401-UC01-T01(& UC01-T02, UC01-T03) 受注検索');
31 31
 
32 32
         $findOrders = Fixtures::get('findOrders'); // Closure
33
-        $TargetOrders = array_filter($findOrders(), function ($Order) {
33
+        $TargetOrders = array_filter($findOrders(), function($Order) {
34 34
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
35 35
         });
36 36
         OrderManagePage::go($I)->検索();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $I->wantTo('EA0401-UC02-T01 受注CSVダウンロード');
53 53
 
54 54
         $findOrders = Fixtures::get('findOrders'); // Closure
55
-        $TargetOrders = array_filter($findOrders(), function ($Order) {
55
+        $TargetOrders = array_filter($findOrders(), function($Order) {
56 56
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
57 57
         });
58 58
         $OrderListPage = OrderManagePage::go($I)->検索();
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $I->wantTo('EA0401-UC02-T02 受注情報のCSV出力項目変更設定');
71 71
 
72 72
         $findOrders = Fixtures::get('findOrders'); // Closure
73
-        $TargetOrders = array_filter($findOrders(), function ($Order) {
73
+        $TargetOrders = array_filter($findOrders(), function($Order) {
74 74
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
75 75
         });
76 76
         $OrderListPage = OrderManagePage::go($I)->検索();
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $I->wantTo('EA0401-UC05-T01(& UC05-T02/UC05-T03/UC06-T01) 受注編集');
90 90
 
91 91
         $findOrders = Fixtures::get('findOrders'); // Closure
92
-        $TargetOrders = array_filter($findOrders(), function ($Order) {
92
+        $TargetOrders = array_filter($findOrders(), function($Order) {
93 93
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
94 94
         });
95 95
         $OrderListPage = OrderManagePage::go($I)->検索();
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         $I->wantTo('EA0401-UC08-T01(& UC08-T02) 受注削除');
153 153
 
154 154
         $findOrders = Fixtures::get('findOrders'); // Closure
155
-        $TargetOrders = array_filter($findOrders(), function ($Order) {
155
+        $TargetOrders = array_filter($findOrders(), function($Order) {
156 156
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
157 157
         });
158 158
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
         $I->resetEmails();
187 187
         $findOrders = Fixtures::get('findOrders');
188
-        $NewOrders = array_filter($findOrders(), function ($Order) {
188
+        $NewOrders = array_filter($findOrders(), function($Order) {
189 189
             return $Order->getOrderStatus()->getId() == OrderStatus::NEW;
190 190
         });
191 191
         $Order = array_pop($NewOrders);
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
         $config = Fixtures::get('config');
216 216
         $findOrders = Fixtures::get('findOrders'); // Closure
217
-        $TargetOrders = array_filter($findOrders(), function ($Order) use ($config) {
217
+        $TargetOrders = array_filter($findOrders(), function($Order) use ($config) {
218 218
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
219 219
         });
220 220
         $OrderListPage = OrderManagePage::go($I)->検索();
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         // 新規受付ステータスをキャンセルに変更する
275 275
         $entityManager = Fixtures::get('entityManager');
276 276
         $findOrders = Fixtures::get('findOrders');
277
-        $NewOrders = array_filter($findOrders(), function ($Order) {
277
+        $NewOrders = array_filter($findOrders(), function($Order) {
278 278
             return $Order->getOrderStatus()->getId() == OrderStatus::NEW;
279 279
         });
280 280
         $CancelStatus = $entityManager->getRepository('Eccube\Entity\Master\OrderStatus')->find(OrderStatus::CANCEL);
@@ -293,13 +293,13 @@  discard block
 block discarded – undo
293 293
         }
294 294
         $entityManager->flush();
295 295
 
296
-        $NewOrders = array_filter($findOrders(), function ($Order) {
296
+        $NewOrders = array_filter($findOrders(), function($Order) {
297 297
             return $Order->getOrderStatus()->getId() == OrderStatus::NEW;
298 298
         });
299 299
         OrderManagePage::go($I)->受注ステータス検索(OrderStatus::NEW);
300 300
         $I->see('検索結果:'.count($NewOrders).'件が該当しました', OrderManagePage::$検索結果_メッセージ);
301 301
 
302
-        $DeliveredOrders = array_filter($findOrders(), function ($Order) {
302
+        $DeliveredOrders = array_filter($findOrders(), function($Order) {
303 303
             return $Order->getOrderStatus()->getId() == OrderStatus::DELIVERED;
304 304
         });
305 305
         OrderManagePage::go($I)->受注ステータス検索(OrderStatus::DELIVERED);
Please login to merge, or discard this patch.
codeception/_support/AcceptanceTester.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function loginAsAdmin($user = '', $password = '', $dir = '')
32 32
     {
33
-        if(!$user || !$password) {
33
+        if (!$user || !$password) {
34 34
             $account = Fixtures::get('admin_account');
35 35
             $user = $account['member'];
36 36
             $password = $account['password'];
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     public function setStock($pid, $stock = 0)
99 99
     {
100
-        if(!$pid) {
100
+        if (!$pid) {
101 101
             return;
102 102
         }
103 103
         $entityManager = Fixtures::get('entityManager');
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function getLastDownloadFile($fileNameRegex, $retryCount = 3)
154 154
     {
155
-        $downloadDir = __DIR__ . '/_downloads/';
155
+        $downloadDir = __DIR__.'/_downloads/';
156 156
         $files = scandir($downloadDir);
157 157
         $files = array_map(function($fileName) use ($downloadDir) {
158 158
             return $downloadDir.$fileName;
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     {
182 182
         $this->wait(1);
183 183
         $this->executeInSelenium(function($webdriver) {
184
-            $handles=$webdriver->getWindowHandles();
184
+            $handles = $webdriver->getWindowHandles();
185 185
             $last_window = end($handles);
186 186
             $webdriver->switchTo()->window($last_window);
187 187
         });
Please login to merge, or discard this patch.
codeception/_support/Page/Admin/CategoryManagePage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
         return "body > div > div.c-contentsArea > div.c-contentsArea__cols > div.c-contentsArea__primaryCol > div > div > div > div > ul > li:nth-child($rowNum) > div > div.col.d-flex.align-items-center > a";
99 99
     }
100 100
 
101
-    public static function XPathでタグを取得する($textEl){
101
+    public static function XPathでタグを取得する($textEl) {
102 102
         return '//*[@id="page_admin_product_category"]/div[1]/div[3]/div[3]/div[1]/div/div/div/div/ul/li/div/div[2]/a[contains(text(), "'.$textEl.'")]';
103 103
     }
104 104
 }
105 105
\ No newline at end of file
Please login to merge, or discard this patch.
codeception/_support/Page/Admin/OrderManagePage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
 
114 114
     public function 受注ステータス検索($value = '')
115 115
     {
116
-        $this->tester->checkOption(['id' => 'admin_search_order_status_' . $value]);
116
+        $this->tester->checkOption(['id' => 'admin_search_order_status_'.$value]);
117 117
         $this->tester->click('#search_form #search_submit');
118 118
         return $this;
119 119
     }
Please login to merge, or discard this patch.
codeception/_support/Page/Admin/ProductManagePage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     {
64 64
         $this->tester->click(self::$詳細検索ボタン);
65 65
         $this->tester->wait(1);
66
-        $this->tester->checkOption(['id' => 'admin_search_product_status_' . $value]);
66
+        $this->tester->checkOption(['id' => 'admin_search_product_status_'.$value]);
67 67
         $this->tester->click(self::$検索ボタン);
68 68
         $this->tester->see('商品マスター商品管理', '.c-pageTitle');
69 69
         return $this;
Please login to merge, or discard this patch.
codeception/_support/Page/Admin/OwnersPluginPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
     public function インストール($fileName)
31 31
     {
32
-        $this->tester->attachFile(['id' => 'plugin_local_install_plugin_archive'],  $fileName);
32
+        $this->tester->attachFile(['id' => 'plugin_local_install_plugin_archive'], $fileName);
33 33
         $this->tester->click('#aside_column button');
34 34
         return $this;
35 35
     }
Please login to merge, or discard this patch.