@@ -46,7 +46,7 @@ |
||
46 | 46 | 'expanded' => false, |
47 | 47 | 'required' => false, |
48 | 48 | 'placeholder' => false, |
49 | - 'query_builder' => function (EntityRepository $er) { |
|
49 | + 'query_builder' => function(EntityRepository $er) { |
|
50 | 50 | return $er->createQueryBuilder('m') |
51 | 51 | ->orderBy('m.sort_no', 'ASC'); |
52 | 52 | }, |
@@ -172,7 +172,7 @@ |
||
172 | 172 | $entity = new $entityName(); |
173 | 173 | $sortNo = 0; |
174 | 174 | $ids = array_map( |
175 | - function ($v) { |
|
175 | + function($v) { |
|
176 | 176 | return $v['id']; |
177 | 177 | }, |
178 | 178 | $data['data'] |
@@ -33,7 +33,6 @@ |
||
33 | 33 | use Eccube\Entity\Plugin; |
34 | 34 | use Eccube\Entity\PluginEventHandler; |
35 | 35 | use Eccube\Exception\PluginException; |
36 | -use Eccube\Plugin\ConfigManager; |
|
37 | 36 | use Eccube\Plugin\ConfigManager as PluginConfigManager; |
38 | 37 | use Eccube\Repository\PluginEventHandlerRepository; |
39 | 38 | use Eccube\Repository\PluginRepository; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | * @param string $path path to tar.gz/zip plugin file |
140 | 140 | * @param int $source |
141 | 141 | * |
142 | - * @return mixed |
|
142 | + * @return boolean |
|
143 | 143 | * |
144 | 144 | * @throws PluginException |
145 | 145 | * @throws \Exception |
@@ -263,6 +263,10 @@ discard block |
||
263 | 263 | } |
264 | 264 | } |
265 | 265 | |
266 | + /** |
|
267 | + * @param string $archive |
|
268 | + * @param string $dir |
|
269 | + */ |
|
266 | 270 | public function unpackPluginArchive($archive, $dir) |
267 | 271 | { |
268 | 272 | $extension = pathinfo($archive, PATHINFO_EXTENSION); |
@@ -322,6 +326,9 @@ discard block |
||
322 | 326 | } |
323 | 327 | } |
324 | 328 | |
329 | + /** |
|
330 | + * @param string $yml |
|
331 | + */ |
|
325 | 332 | public function readYml($yml) |
326 | 333 | { |
327 | 334 | if (file_exists($yml)) { |
@@ -339,6 +346,9 @@ discard block |
||
339 | 346 | // ディレクトリ名などに使われれるので厳しめ |
340 | 347 | } |
341 | 348 | |
349 | + /** |
|
350 | + * @param string $path |
|
351 | + */ |
|
342 | 352 | public function deleteFile($path) |
343 | 353 | { |
344 | 354 | $f = new Filesystem(); |
@@ -358,6 +368,9 @@ discard block |
||
358 | 368 | return $this->projectRoot.'/app/Plugin/'.$name; |
359 | 369 | } |
360 | 370 | |
371 | + /** |
|
372 | + * @param string $d |
|
373 | + */ |
|
361 | 374 | public function createPluginDir($d) |
362 | 375 | { |
363 | 376 | $b = @mkdir($d); |
@@ -418,6 +431,9 @@ discard block |
||
418 | 431 | return $p; |
419 | 432 | } |
420 | 433 | |
434 | + /** |
|
435 | + * @param string $method |
|
436 | + */ |
|
421 | 437 | public function callPluginManagerMethod($meta, $method) |
422 | 438 | { |
423 | 439 | $class = '\\Plugin'.'\\'.$meta['code'].'\\'.'PluginManager'; |
@@ -951,7 +967,7 @@ discard block |
||
951 | 967 | * [プラグインコード]/Resource/assets |
952 | 968 | * 配下に置かれているファイルが所定の位置へコピーされる |
953 | 969 | * |
954 | - * @param $pluginBaseDir |
|
970 | + * @param string $pluginBaseDir |
|
955 | 971 | * @param $pluginCode |
956 | 972 | */ |
957 | 973 | public function copyAssets($pluginBaseDir, $pluginCode) |
@@ -987,7 +1003,7 @@ discard block |
||
987 | 1003 | * @param string $pluginVersion |
988 | 1004 | * @param string $remoteVersion |
989 | 1005 | * |
990 | - * @return mixed |
|
1006 | + * @return boolean |
|
991 | 1007 | */ |
992 | 1008 | public function isUpdate($pluginVersion, $remoteVersion) |
993 | 1009 | { |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | @mkdir($outputDir); |
494 | 494 | |
495 | 495 | $enabledPluginCodes = array_map( |
496 | - function ($p) { return $p->getCode(); }, |
|
496 | + function($p) { return $p->getCode(); }, |
|
497 | 497 | $this->pluginRepository->findAllEnabled() |
498 | 498 | ); |
499 | 499 | |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | } |
509 | 509 | } |
510 | 510 | |
511 | - $enabledPluginEntityDirs = array_map(function ($code) { |
|
511 | + $enabledPluginEntityDirs = array_map(function($code) { |
|
512 | 512 | return $this->projectRoot."/app/Plugin/${code}/Entity"; |
513 | 513 | }, $enabledPluginCodes); |
514 | 514 | |
@@ -937,7 +937,7 @@ discard block |
||
937 | 937 | { |
938 | 938 | $result = array_keys($packages); |
939 | 939 | if ($getVersion) { |
940 | - $result = array_map(function ($package, $version) { |
|
940 | + $result = array_map(function($package, $version) { |
|
941 | 941 | return $package.':'.$version; |
942 | 942 | }, array_keys($packages), array_values($packages)); |
943 | 943 | } |
@@ -17,11 +17,11 @@ discard block |
||
17 | 17 | { |
18 | 18 | public function register(Container $app) |
19 | 19 | { |
20 | - $app['eccube.purchase.context'] = $app->protect(function (ItemHolderInterface $origin = null, Customer $user = null) { |
|
20 | + $app['eccube.purchase.context'] = $app->protect(function(ItemHolderInterface $origin = null, Customer $user = null) { |
|
21 | 21 | return new PurchaseContext($origin, $user); |
22 | 22 | }); |
23 | 23 | |
24 | - $app['eccube.purchase.flow.cart.item_processors'] = function (Container $app) { |
|
24 | + $app['eccube.purchase.flow.cart.item_processors'] = function(Container $app) { |
|
25 | 25 | $processors = new ArrayCollection(); |
26 | 26 | $processors[] = new Processor\DisplayStatusValidator(); |
27 | 27 | $processors[] = new Processor\SaleLimitValidator(); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | return $processors; |
32 | 32 | }; |
33 | 33 | |
34 | - $app['eccube.purchase.flow.cart.holder_processors'] = function (Container $app) { |
|
34 | + $app['eccube.purchase.flow.cart.holder_processors'] = function(Container $app) { |
|
35 | 35 | $processors = new ArrayCollection(); |
36 | 36 | $processors[] = new Processor\PaymentProcessor($app[DeliveryRepository::class]); |
37 | 37 | $processors[] = new Processor\PaymentTotalLimitValidator($app['config']['max_total_fee']); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | return $processors; |
42 | 42 | }; |
43 | 43 | |
44 | - $app['eccube.purchase.flow.cart'] = function (Container $app) { |
|
44 | + $app['eccube.purchase.flow.cart'] = function(Container $app) { |
|
45 | 45 | $flow = new PurchaseFlow(); |
46 | 46 | $flow->setItemProcessors($app['eccube.purchase.flow.cart.item_processors']); |
47 | 47 | $flow->setItemHolderProcessors($app['eccube.purchase.flow.cart.holder_processors']); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | return $flow; |
50 | 50 | }; |
51 | 51 | |
52 | - $app['eccube.purchase.flow.shopping.item_processors'] = function (Container $app) { |
|
52 | + $app['eccube.purchase.flow.shopping.item_processors'] = function(Container $app) { |
|
53 | 53 | $processors = new ArrayCollection(); |
54 | 54 | $processors[] = new Processor\StockValidator(); |
55 | 55 | $processors[] = new Processor\DisplayStatusValidator(); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | return $processors; |
58 | 58 | }; |
59 | 59 | |
60 | - $app['eccube.purchase.flow.shopping.holder_processors'] = function (Container $app) { |
|
60 | + $app['eccube.purchase.flow.shopping.holder_processors'] = function(Container $app) { |
|
61 | 61 | $processors = new ArrayCollection(); |
62 | 62 | $processors[] = new Processor\PaymentTotalLimitValidator($app['config']['max_total_fee']); |
63 | 63 | $processors[] = new Processor\DeliveryFeeProcessor($app['orm.em']); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | return $processors; |
72 | 72 | }; |
73 | 73 | |
74 | - $app['eccube.purchase.flow.shopping.purchase'] = function (Container $app) { |
|
74 | + $app['eccube.purchase.flow.shopping.purchase'] = function(Container $app) { |
|
75 | 75 | $processors = new ArrayCollection(); |
76 | 76 | if ($app[BaseInfo::class]->isOptionPoint()) { |
77 | 77 | $processors[] = new Processor\UsePointToCustomerPurchaseProcessor(); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | return $processors; |
82 | 82 | }; |
83 | 83 | |
84 | - $app['eccube.purchase.flow.shopping'] = function (Container $app) { |
|
84 | + $app['eccube.purchase.flow.shopping'] = function(Container $app) { |
|
85 | 85 | $flow = new PurchaseFlow(); |
86 | 86 | $flow->setItemProcessors($app['eccube.purchase.flow.shopping.item_processors']); |
87 | 87 | $flow->setItemHolderProcessors($app['eccube.purchase.flow.shopping.holder_processors']); |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | return $flow; |
91 | 91 | }; |
92 | 92 | |
93 | - $app['eccube.purchase.flow.order.item_processors'] = function (Container $app) { |
|
93 | + $app['eccube.purchase.flow.order.item_processors'] = function(Container $app) { |
|
94 | 94 | $processors = new ArrayCollection(); |
95 | 95 | $processors[] = new Processor\StockValidator(); |
96 | 96 | |
97 | 97 | return $processors; |
98 | 98 | }; |
99 | 99 | |
100 | - $app['eccube.purchase.flow.order.holder_processors'] = function (Container $app) { |
|
100 | + $app['eccube.purchase.flow.order.holder_processors'] = function(Container $app) { |
|
101 | 101 | $processors = new ArrayCollection(); |
102 | 102 | $processors[] = new Processor\PaymentTotalLimitValidator($app['config']['max_total_fee']); |
103 | 103 | $processors[] = new Processor\UpdateDatePurchaseProcessor($app['config']); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | return $processors; |
111 | 111 | }; |
112 | 112 | |
113 | - $app['eccube.purchase.flow.order.purchase'] = function (Container $app) { |
|
113 | + $app['eccube.purchase.flow.order.purchase'] = function(Container $app) { |
|
114 | 114 | $processors = new ArrayCollection(); |
115 | 115 | $processors[] = new Processor\AdminOrderRegisterPurchaseProcessor($app); |
116 | 116 | $processors[] = new Processor\OrderCodePurchaseProcessor($app['orm.em'], $app['config']['order_code']); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | return $processors; |
119 | 119 | }; |
120 | 120 | |
121 | - $app['eccube.purchase.flow.order'] = function (Container $app) { |
|
121 | + $app['eccube.purchase.flow.order'] = function(Container $app) { |
|
122 | 122 | $flow = new PurchaseFlow(); |
123 | 123 | $flow->setItemProcessors($app['eccube.purchase.flow.order.item_processors']); |
124 | 124 | $flow->setItemHolderProcessors($app['eccube.purchase.flow.order.holder_processors']); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * |
28 | 28 | * @param Application $app |
29 | 29 | * |
30 | - * @return \Symfony\Component\HttpFoundation\Response |
|
30 | + * @return string |
|
31 | 31 | */ |
32 | 32 | public function testAdmin(Application $app) |
33 | 33 | { |
@@ -12,6 +12,9 @@ |
||
12 | 12 | |
13 | 13 | class DragAndDropBy extends WebDriverActions |
14 | 14 | { |
15 | + /** |
|
16 | + * @param \Facebook\WebDriver\Remote\RemoteWebElement $source |
|
17 | + */ |
|
15 | 18 | public function __construct(WebDriver $driver, $source, $x_offset, $y_offset) |
16 | 19 | { |
17 | 20 | parent::__construct($driver); |
@@ -14,6 +14,9 @@ |
||
14 | 14 | */ |
15 | 15 | private $timeout_in_second; |
16 | 16 | |
17 | + /** |
|
18 | + * @param integer $timeout_in_second |
|
19 | + */ |
|
17 | 20 | function __construct($timeout_in_second) |
18 | 21 | { |
19 | 22 | $this->timeout_in_second = $timeout_in_second; |
@@ -48,12 +48,18 @@ discard block |
||
48 | 48 | return $this; |
49 | 49 | } |
50 | 50 | |
51 | + /** |
|
52 | + * @param integer $rowNum |
|
53 | + */ |
|
51 | 54 | public function 一覧_編集($rowNum) |
52 | 55 | { |
53 | 56 | $this->tester->click("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td:nth-child(2) > a"); |
54 | 57 | return $this; |
55 | 58 | } |
56 | 59 | |
60 | + /** |
|
61 | + * @param integer $rowNum |
|
62 | + */ |
|
57 | 63 | public function 一覧_削除($rowNum, $execute = true) |
58 | 64 | { |
59 | 65 | $this->tester->click("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div > a"); |
@@ -67,6 +73,9 @@ discard block |
||
67 | 73 | return $this; |
68 | 74 | } |
69 | 75 | |
76 | + /** |
|
77 | + * @param integer $rowNum |
|
78 | + */ |
|
70 | 79 | public function 一覧_仮会員メール再送($rowNum) |
71 | 80 | { |
72 | 81 | $this->tester->click(['xpath' => "//*[@id='search_form']//div/table/tbody/tr[${rowNum}]/td[6]/div/div[1]/a"]); |
@@ -92,6 +101,9 @@ discard block |
||
92 | 101 | $this->tester->click('#search_form > div.c-contentsArea__cols > div > div > div.row.justify-content-between.mb-2 > div.col-5.text-right > div:nth-child(2) > div > button:nth-child(2)'); |
93 | 102 | } |
94 | 103 | |
104 | + /** |
|
105 | + * @param integer $rowNum |
|
106 | + */ |
|
95 | 107 | public function 一覧_会員ID($rowNum) |
96 | 108 | { |
97 | 109 | return $this->tester->grabTextFrom("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pl-3"); |
@@ -19,6 +19,9 @@ discard block |
||
19 | 19 | parent::__construct($I); |
20 | 20 | } |
21 | 21 | |
22 | + /** |
|
23 | + * @param \AcceptanceTester $I |
|
24 | + */ |
|
22 | 25 | public static function go($I) |
23 | 26 | { |
24 | 27 | $page = new self($I); |
@@ -26,6 +29,9 @@ discard block |
||
26 | 29 | return $page; |
27 | 30 | } |
28 | 31 | |
32 | + /** |
|
33 | + * @param \AcceptanceTester $I |
|
34 | + */ |
|
29 | 35 | public static function at($I) |
30 | 36 | { |
31 | 37 | $page = new self($I); |
@@ -46,36 +52,54 @@ discard block |
||
46 | 52 | return $this; |
47 | 53 | } |
48 | 54 | |
55 | + /** |
|
56 | + * @param string $value |
|
57 | + */ |
|
49 | 58 | public function 入力_姓($value) |
50 | 59 | { |
51 | 60 | $this->tester->fillField(['id' => 'shipping_name_name01'], $value); |
52 | 61 | return $this; |
53 | 62 | } |
54 | 63 | |
64 | + /** |
|
65 | + * @param string $value |
|
66 | + */ |
|
55 | 67 | public function 入力_名($value) |
56 | 68 | { |
57 | 69 | $this->tester->fillField(['id' => 'shipping_name_name02'], $value); |
58 | 70 | return $this; |
59 | 71 | } |
60 | 72 | |
73 | + /** |
|
74 | + * @param string $value |
|
75 | + */ |
|
61 | 76 | public function 入力_セイ($value) |
62 | 77 | { |
63 | 78 | $this->tester->fillField(['id' => 'shipping_kana_kana01'], $value); |
64 | 79 | return $this; |
65 | 80 | } |
66 | 81 | |
82 | + /** |
|
83 | + * @param string $value |
|
84 | + */ |
|
67 | 85 | public function 入力_メイ($value) |
68 | 86 | { |
69 | 87 | $this->tester->fillField(['id' => 'shipping_kana_kana02'], $value); |
70 | 88 | return $this; |
71 | 89 | } |
72 | 90 | |
91 | + /** |
|
92 | + * @param string $value |
|
93 | + */ |
|
73 | 94 | public function 入力_郵便番号1($value) |
74 | 95 | { |
75 | 96 | $this->tester->fillField(['id' => 'shipping_zip_zip01'], $value); |
76 | 97 | return $this; |
77 | 98 | } |
78 | 99 | |
100 | + /** |
|
101 | + * @param string $value |
|
102 | + */ |
|
79 | 103 | public function 入力_郵便番号2($value) |
80 | 104 | { |
81 | 105 | $this->tester->fillField(['id' => 'shipping_zip_zip02'], $value); |
@@ -88,48 +112,72 @@ discard block |
||
88 | 112 | return $this; |
89 | 113 | } |
90 | 114 | |
115 | + /** |
|
116 | + * @param string $value |
|
117 | + */ |
|
91 | 118 | public function 入力_市区町村名($value) |
92 | 119 | { |
93 | 120 | $this->tester->fillField(['id' => 'shipping_address_addr01'], $value); |
94 | 121 | return $this; |
95 | 122 | } |
96 | 123 | |
124 | + /** |
|
125 | + * @param string $value |
|
126 | + */ |
|
97 | 127 | public function 入力_番地_ビル名($value) |
98 | 128 | { |
99 | 129 | $this->tester->fillField(['id' => 'shipping_address_addr02'], $value); |
100 | 130 | return $this; |
101 | 131 | } |
102 | 132 | |
133 | + /** |
|
134 | + * @param string $value |
|
135 | + */ |
|
103 | 136 | public function 入力_電話番号1($value) |
104 | 137 | { |
105 | 138 | $this->tester->fillField(['id' => 'shipping_tel_tel01'], $value); |
106 | 139 | return $this; |
107 | 140 | } |
108 | 141 | |
142 | + /** |
|
143 | + * @param string $value |
|
144 | + */ |
|
109 | 145 | public function 入力_電話番号2($value) |
110 | 146 | { |
111 | 147 | $this->tester->fillField(['id' => 'shipping_tel_tel02'], $value); |
112 | 148 | return $this; |
113 | 149 | } |
114 | 150 | |
151 | + /** |
|
152 | + * @param string $value |
|
153 | + */ |
|
115 | 154 | public function 入力_電話番号3($value) |
116 | 155 | { |
117 | 156 | $this->tester->fillField(['id' => 'shipping_tel_tel03'], $value); |
118 | 157 | return $this; |
119 | 158 | } |
120 | 159 | |
160 | + /** |
|
161 | + * @param string $value |
|
162 | + */ |
|
121 | 163 | public function 入力_出荷伝票番号($value) |
122 | 164 | { |
123 | 165 | $this->tester->fillField(['id' => 'shipping_tracking_number'], $value); |
124 | 166 | return $this; |
125 | 167 | } |
126 | 168 | |
169 | + /** |
|
170 | + * @param string[] $value |
|
171 | + */ |
|
127 | 172 | public function 入力_配送業者($value) |
128 | 173 | { |
129 | 174 | $this->tester->selectOption(['id' => 'shipping_Delivery'], $value); |
130 | 175 | return $this; |
131 | 176 | } |
132 | 177 | |
178 | + /** |
|
179 | + * @param string $value |
|
180 | + */ |
|
133 | 181 | public function 入力_配達用メモ($value) |
134 | 182 | { |
135 | 183 | $this->tester->fillField(['id' => 'shipping_note'], $value); |
@@ -144,6 +192,9 @@ discard block |
||
144 | 192 | return $this; |
145 | 193 | } |
146 | 194 | |
195 | + /** |
|
196 | + * @param integer $rowNum |
|
197 | + */ |
|
147 | 198 | public function 商品検索結果_選択($rowNum) |
148 | 199 | { |
149 | 200 | $this->tester->click(['xpath' => "//*[@id='searchItemsResult']/table/tbody/tr[${rowNum}]/td[5]/i"]); |