@@ -11,163 +11,163 @@ |
||
11 | 11 | public function register(Container $app) |
12 | 12 | { |
13 | 13 | // Repository |
14 | - $app['eccube.repository.master.authority'] = function () use ($app) { |
|
14 | + $app['eccube.repository.master.authority'] = function() use ($app) { |
|
15 | 15 | return $app['Eccube\Repository\Master\AuthorityRepository']; |
16 | 16 | }; |
17 | - $app['eccube.repository.master.tag'] = function () use ($app) { |
|
17 | + $app['eccube.repository.master.tag'] = function() use ($app) { |
|
18 | 18 | return $app['Eccube\Repository\Master\TagRepository']; |
19 | 19 | }; |
20 | - $app['eccube.repository.master.pref'] = function () use ($app) { |
|
20 | + $app['eccube.repository.master.pref'] = function() use ($app) { |
|
21 | 21 | return $app['Eccube\Repository\Master\PrefRepository']; |
22 | 22 | }; |
23 | - $app['eccube.repository.master.sex'] = function () use ($app) { |
|
23 | + $app['eccube.repository.master.sex'] = function() use ($app) { |
|
24 | 24 | return $app['Eccube\Repository\Master\SexRepository']; |
25 | 25 | }; |
26 | - $app['eccube.repository.master.product_status'] = function () use ($app) { |
|
26 | + $app['eccube.repository.master.product_status'] = function() use ($app) { |
|
27 | 27 | return $app['Eccube\Repository\Master\ProductStatusRepository']; |
28 | 28 | }; |
29 | - $app['eccube.repository.master.product_type'] = function () use ($app) { |
|
29 | + $app['eccube.repository.master.product_type'] = function() use ($app) { |
|
30 | 30 | return $app['Eccube\Repository\Master\ProductTypeRepository']; |
31 | 31 | }; |
32 | - $app['eccube.repository.master.page_max'] = function () use ($app) { |
|
32 | + $app['eccube.repository.master.page_max'] = function() use ($app) { |
|
33 | 33 | return $app['Eccube\Repository\Master\PageMaxRepository']; |
34 | 34 | }; |
35 | - $app['eccube.repository.master.order_status'] = function () use ($app) { |
|
35 | + $app['eccube.repository.master.order_status'] = function() use ($app) { |
|
36 | 36 | return $app['Eccube\Repository\Master\OrderStatusRepository']; |
37 | 37 | }; |
38 | - $app['eccube.repository.master.product_list_max'] = function () use ($app) { |
|
38 | + $app['eccube.repository.master.product_list_max'] = function() use ($app) { |
|
39 | 39 | return $app['Eccube\Repository\Master\ProductListMaxRepository']; |
40 | 40 | }; |
41 | - $app['eccube.repository.master.product_list_order_by'] = function () use ($app) { |
|
41 | + $app['eccube.repository.master.product_list_order_by'] = function() use ($app) { |
|
42 | 42 | return $app['Eccube\Repository\Master\ProductListOrderByRepository']; |
43 | 43 | }; |
44 | - $app['eccube.repository.master.device_type'] = function () use ($app) { |
|
44 | + $app['eccube.repository.master.device_type'] = function() use ($app) { |
|
45 | 45 | return $app['Eccube\Repository\Master\DeviceTypeRepository']; |
46 | 46 | }; |
47 | - $app['eccube.repository.master.csv_type'] = function () use ($app) { |
|
47 | + $app['eccube.repository.master.csv_type'] = function() use ($app) { |
|
48 | 48 | return $app['Eccube\Repository\Master\CsvTypeRepository']; |
49 | 49 | }; |
50 | - $app['eccube.repository.master.order_item_type'] = function () use ($app) { |
|
50 | + $app['eccube.repository.master.order_item_type'] = function() use ($app) { |
|
51 | 51 | return $app['Eccube\Repository\Master\OrderItemTypeRepository']; |
52 | 52 | }; |
53 | - $app['eccube.repository.base_info'] = function () use ($app) { |
|
53 | + $app['eccube.repository.base_info'] = function() use ($app) { |
|
54 | 54 | return $app['Eccube\Repository\BaseInfoRepository']; |
55 | 55 | }; |
56 | - $app['eccube.repository.delivery'] = function () use ($app) { |
|
56 | + $app['eccube.repository.delivery'] = function() use ($app) { |
|
57 | 57 | return $app['Eccube\Repository\DeliveryRepository']; |
58 | 58 | }; |
59 | - $app['eccube.repository.delivery_date'] = function () use ($app) { |
|
59 | + $app['eccube.repository.delivery_date'] = function() use ($app) { |
|
60 | 60 | return $app['Eccube\Repository\DeliveryDateRepository']; |
61 | 61 | }; |
62 | - $app['eccube.repository.delivery_fee'] = function () use ($app) { |
|
62 | + $app['eccube.repository.delivery_fee'] = function() use ($app) { |
|
63 | 63 | return $app['Eccube\Repository\DeliveryFeeRepository']; |
64 | 64 | }; |
65 | - $app['eccube.repository.delivery_time'] = function () use ($app) { |
|
65 | + $app['eccube.repository.delivery_time'] = function() use ($app) { |
|
66 | 66 | return $app['Eccube\Repository\DeliveryTimeRepository']; |
67 | 67 | }; |
68 | - $app['eccube.repository.payment'] = function () use ($app) { |
|
68 | + $app['eccube.repository.payment'] = function() use ($app) { |
|
69 | 69 | return $app['Eccube\Repository\PaymentRepository']; |
70 | 70 | }; |
71 | - $app['eccube.repository.payment_option'] = function () use ($app) { |
|
71 | + $app['eccube.repository.payment_option'] = function() use ($app) { |
|
72 | 72 | return $app['Eccube\Repository\PaymentOptionRepository']; |
73 | 73 | }; |
74 | - $app['eccube.repository.customer'] = function () use ($app) { |
|
74 | + $app['eccube.repository.customer'] = function() use ($app) { |
|
75 | 75 | return $app['Eccube\Repository\CustomerRepository']; |
76 | 76 | }; |
77 | - $app['eccube.repository.news'] = function () use ($app) { |
|
77 | + $app['eccube.repository.news'] = function() use ($app) { |
|
78 | 78 | return $app['Eccube\Repository\NewsRepository']; |
79 | 79 | }; |
80 | - $app['eccube.repository.mail_history'] = function () use ($app) { |
|
80 | + $app['eccube.repository.mail_history'] = function() use ($app) { |
|
81 | 81 | return $app['Eccube\Repository\MailHistoryRepository']; |
82 | 82 | }; |
83 | - $app['eccube.repository.member'] = function () use ($app) { |
|
83 | + $app['eccube.repository.member'] = function() use ($app) { |
|
84 | 84 | return $app['Eccube\Repository\MemberRepository']; |
85 | 85 | }; |
86 | - $app['eccube.repository.order'] = function () use ($app) { |
|
86 | + $app['eccube.repository.order'] = function() use ($app) { |
|
87 | 87 | return $app['Eccube\Repository\OrderRepository']; |
88 | 88 | }; |
89 | - $app['eccube.repository.product'] = function () use ($app) { |
|
89 | + $app['eccube.repository.product'] = function() use ($app) { |
|
90 | 90 | return $app['Eccube\Repository\ProductRepository']; |
91 | 91 | }; |
92 | - $app['eccube.repository.product_image'] = function () use ($app) { |
|
92 | + $app['eccube.repository.product_image'] = function() use ($app) { |
|
93 | 93 | return $app['Eccube\Repository\ProductImageRepository']; |
94 | 94 | }; |
95 | - $app['eccube.repository.product_class'] = function () use ($app) { |
|
95 | + $app['eccube.repository.product_class'] = function() use ($app) { |
|
96 | 96 | return $app['Eccube\Repository\ProductClassRepository']; |
97 | 97 | }; |
98 | - $app['eccube.repository.product_stock'] = function () use ($app) { |
|
98 | + $app['eccube.repository.product_stock'] = function() use ($app) { |
|
99 | 99 | return $app['Eccube\Repository\ProductStockRepository']; |
100 | 100 | }; |
101 | - $app['eccube.repository.product_tag'] = function () use ($app) { |
|
101 | + $app['eccube.repository.product_tag'] = function() use ($app) { |
|
102 | 102 | return $app['Eccube\Repository\ProductTagRepository']; |
103 | 103 | }; |
104 | - $app['eccube.repository.class_name'] = function () use ($app) { |
|
104 | + $app['eccube.repository.class_name'] = function() use ($app) { |
|
105 | 105 | return $app['Eccube\Repository\ClassNameRepository']; |
106 | 106 | }; |
107 | - $app['eccube.repository.class_category'] = function () use ($app) { |
|
107 | + $app['eccube.repository.class_category'] = function() use ($app) { |
|
108 | 108 | return $app['Eccube\Repository\ClassCategoryRepository']; |
109 | 109 | }; |
110 | - $app['eccube.repository.customer_favorite_product'] = function () use ($app) { |
|
110 | + $app['eccube.repository.customer_favorite_product'] = function() use ($app) { |
|
111 | 111 | return $app['Eccube\Repository\CustomerFavoriteProductRepository']; |
112 | 112 | }; |
113 | - $app['eccube.repository.tax_rule'] = function () use ($app) { |
|
113 | + $app['eccube.repository.tax_rule'] = function() use ($app) { |
|
114 | 114 | return $app['Eccube\Repository\TaxRuleRepository']; |
115 | 115 | }; |
116 | - $app['eccube.repository.page'] = function () use ($app) { |
|
116 | + $app['eccube.repository.page'] = function() use ($app) { |
|
117 | 117 | return $app['Eccube\Repository\PageRepository']; |
118 | 118 | }; |
119 | - $app['eccube.repository.block'] = function () use ($app) { |
|
119 | + $app['eccube.repository.block'] = function() use ($app) { |
|
120 | 120 | return $app['Eccube\Repository\BlockRepository']; |
121 | 121 | }; |
122 | - $app['eccube.repository.order'] = function () use ($app) { |
|
122 | + $app['eccube.repository.order'] = function() use ($app) { |
|
123 | 123 | return $app['Eccube\Repository\OrderRepository']; |
124 | 124 | }; |
125 | - $app['eccube.repository.customer_address'] = function () use ($app) { |
|
125 | + $app['eccube.repository.customer_address'] = function() use ($app) { |
|
126 | 126 | return $app['Eccube\Repository\CustomerAddressRepository']; |
127 | 127 | }; |
128 | - $app['eccube.repository.shipping'] = function () use ($app) { |
|
128 | + $app['eccube.repository.shipping'] = function() use ($app) { |
|
129 | 129 | return $app['Eccube\Repository\ShippingRepository']; |
130 | 130 | }; |
131 | - $app['eccube.repository.order_item'] = function () use ($app) { |
|
131 | + $app['eccube.repository.order_item'] = function() use ($app) { |
|
132 | 132 | return $app['Eccube\Repository\OrderItemRepository']; |
133 | 133 | }; |
134 | - $app['eccube.repository.master.customer_status'] = function () use ($app) { |
|
134 | + $app['eccube.repository.master.customer_status'] = function() use ($app) { |
|
135 | 135 | return $app['Eccube\Repository\Master\CustomerStatusRepository']; |
136 | 136 | }; |
137 | 137 | |
138 | - $app['eccube.repository.mail_template'] = function () use ($app) { |
|
138 | + $app['eccube.repository.mail_template'] = function() use ($app) { |
|
139 | 139 | return $app['Eccube\Repository\MailTemplateRepository']; |
140 | 140 | }; |
141 | - $app['eccube.repository.csv'] = function () use ($app) { |
|
141 | + $app['eccube.repository.csv'] = function() use ($app) { |
|
142 | 142 | return $app['Eccube\Repository\CsvRepository']; |
143 | 143 | }; |
144 | - $app['eccube.repository.template'] = function () use ($app) { |
|
144 | + $app['eccube.repository.template'] = function() use ($app) { |
|
145 | 145 | return $app['Eccube\Repository\TemplateRepository']; |
146 | 146 | }; |
147 | - $app['eccube.repository.authority_role'] = function () use ($app) { |
|
147 | + $app['eccube.repository.authority_role'] = function() use ($app) { |
|
148 | 148 | return $app['Eccube\Repository\AuthorityRoleRepository']; |
149 | 149 | }; |
150 | - $app['eccube.repository.category'] = function () use ($app) { |
|
150 | + $app['eccube.repository.category'] = function() use ($app) { |
|
151 | 151 | return $app['Eccube\Repository\CategoryRepository']; |
152 | 152 | }; |
153 | - $app['eccube.repository.help'] = function () use ($app) { |
|
153 | + $app['eccube.repository.help'] = function() use ($app) { |
|
154 | 154 | return $app['Eccube\Repository\HelpRepository']; |
155 | 155 | }; |
156 | - $app['eccube.repository.plugin'] = function () use ($app) { |
|
156 | + $app['eccube.repository.plugin'] = function() use ($app) { |
|
157 | 157 | return $app['Eccube\Repository\PluginRepository']; |
158 | 158 | }; |
159 | - $app['eccube.repository.plugin_event_handler'] = function () use ($app) { |
|
159 | + $app['eccube.repository.plugin_event_handler'] = function() use ($app) { |
|
160 | 160 | return $app['Eccube\Repository\PluginEventHandlerRepository']; |
161 | 161 | }; |
162 | - $app['eccube.repository.layout'] = function () use ($app) { |
|
162 | + $app['eccube.repository.layout'] = function() use ($app) { |
|
163 | 163 | return $app['Eccube\Repository\LayoutRepository']; |
164 | 164 | }; |
165 | 165 | |
166 | 166 | // alias |
167 | - $app['eccube.repository.order_status'] = function () use ($app) { |
|
167 | + $app['eccube.repository.order_status'] = function() use ($app) { |
|
168 | 168 | return $app['Eccube\Repository\Master\OrderStatusRepository']; |
169 | 169 | }; |
170 | - $app['eccube.repository.customer_status'] = function () use ($app) { |
|
170 | + $app['eccube.repository.customer_status'] = function() use ($app) { |
|
171 | 171 | return $app['Eccube\Repository\Master\CustomerStatusRepository']; |
172 | 172 | }; |
173 | 173 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $app = $this->app; |
62 | 62 | |
63 | 63 | $builder |
64 | - ->addEventListener(FormEvents::POST_SET_DATA, function ($event) use ($app) { |
|
64 | + ->addEventListener(FormEvents::POST_SET_DATA, function($event) use ($app) { |
|
65 | 65 | /** @var \Eccube\Entity\OrderItem $data */ |
66 | 66 | $data = $event->getData(); |
67 | 67 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | /** |
259 | 259 | * 複数配送オプション有効時の画面制御を行う. |
260 | 260 | */ |
261 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
261 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
262 | 262 | |
263 | 263 | if ($this->BaseInfo->getOptionMultipleShipping() != Constant::ENABLED) { |
264 | 264 | return; |
@@ -268,17 +268,16 @@ discard block |
||
268 | 268 | $orderDetails = &$data['OrderDetails']; |
269 | 269 | |
270 | 270 | // 数量0フィルター |
271 | - $quantityFilter = function ($v) { |
|
271 | + $quantityFilter = function($v) { |
|
272 | 272 | return !(isset($v['quantity']) && preg_match('/^0+$/', trim($v['quantity']))); |
273 | 273 | }; |
274 | 274 | |
275 | 275 | // $shippings = &$data['Shippings']; |
276 | 276 | |
277 | 277 | // 数量を抽出 |
278 | - $getQuantity = function ($v) { |
|
278 | + $getQuantity = function($v) { |
|
279 | 279 | return (isset($v['quantity']) && preg_match('/^\d+$/', trim($v['quantity']))) ? |
280 | - trim($v['quantity']) : |
|
281 | - 0; |
|
280 | + trim($v['quantity']) : 0; |
|
282 | 281 | }; |
283 | 282 | |
284 | 283 | // foreach ($shippings as &$shipping) { |
@@ -295,7 +294,7 @@ discard block |
||
295 | 294 | $orderDetail['quantity'] = 0; |
296 | 295 | |
297 | 296 | // 受注詳細と同じ商品規格のみ抽出 |
298 | - $productClassFilter = function ($v) use ($orderDetail) { |
|
297 | + $productClassFilter = function($v) use ($orderDetail) { |
|
299 | 298 | return $orderDetail['ProductClass'] === $v['ProductClass']; |
300 | 299 | }; |
301 | 300 | |
@@ -304,10 +303,9 @@ discard block |
||
304 | 303 | if (!empty($shipping['OrderItems'])) { |
305 | 304 | |
306 | 305 | // 同じ商品規格の受注詳細の価格を適用 |
307 | - $applyPrice = function (&$v) use ($orderDetail) { |
|
306 | + $applyPrice = function(&$v) use ($orderDetail) { |
|
308 | 307 | $v['price'] = ($v['ProductClass'] === $orderDetail['ProductClass']) ? |
309 | - $orderDetail['price'] : |
|
310 | - $v['price']; |
|
308 | + $orderDetail['price'] : $v['price']; |
|
311 | 309 | }; |
312 | 310 | array_walk($shipping['OrderItems'], $applyPrice); |
313 | 311 | |
@@ -336,7 +334,7 @@ discard block |
||
336 | 334 | // } |
337 | 335 | // }); |
338 | 336 | // 選択された支払い方法の名称をエンティティにコピーする |
339 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
337 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
340 | 338 | $Order = $event->getData(); |
341 | 339 | $Payment = $Order->getPayment(); |
342 | 340 | if (!is_null($Payment)) { |
@@ -344,7 +342,7 @@ discard block |
||
344 | 342 | } |
345 | 343 | }); |
346 | 344 | // 会員受注の場合、会員の性別/職業/誕生日をエンティティにコピーする |
347 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
345 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
348 | 346 | $Order = $event->getData(); |
349 | 347 | $Customer = $Order->getCustomer(); |
350 | 348 | if (!is_null($Customer)) { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | ))); |
148 | 148 | |
149 | 149 | $app = $this->app; |
150 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
150 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
151 | 151 | // モーダルからのPOST時に、金額等をセットする. |
152 | 152 | if ('modal' === $this->requestStack->getCurrentRequest()->get('modal')) { |
153 | 153 | $data = $event->getData(); |
@@ -164,17 +164,13 @@ discard block |
||
164 | 164 | $data['product_name'] = $Product->getName(); |
165 | 165 | $data['product_code'] = $ProductClass->getCode(); |
166 | 166 | $data['class_name1'] = $ProductClass->hasClassCategory1() ? |
167 | - $ProductClass->getClassCategory1()->getClassName() : |
|
168 | - null; |
|
167 | + $ProductClass->getClassCategory1()->getClassName() : null; |
|
169 | 168 | $data['class_name2'] = $ProductClass->hasClassCategory2() ? |
170 | - $ProductClass->getClassCategory2()->getClassName() : |
|
171 | - null; |
|
169 | + $ProductClass->getClassCategory2()->getClassName() : null; |
|
172 | 170 | $data['class_category_name1'] = $ProductClass->hasClassCategory1() ? |
173 | - $ProductClass->getClassCategory1()->getName() : |
|
174 | - null; |
|
171 | + $ProductClass->getClassCategory1()->getName() : null; |
|
175 | 172 | $data['class_category_name2'] = $ProductClass->hasClassCategory2() ? |
176 | - $ProductClass->getClassCategory2()->getName() : |
|
177 | - null; |
|
173 | + $ProductClass->getClassCategory2()->getName() : null; |
|
178 | 174 | $data['tax_rule'] = $TaxRule->getRoundingType()->getId(); |
179 | 175 | $data['price'] = $ProductClass->getPrice02(); |
180 | 176 | $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity']; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $app = $this->app; |
179 | 179 | // XXX price を priceIncTax にセットし直す |
180 | 180 | // OrderItem::getTotalPrice でもやっているので、どこか一箇所にまとめたい |
181 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($app) { |
|
181 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($app) { |
|
182 | 182 | /** @var \Eccube\Entity\OrderItem $OrderItem */ |
183 | 183 | $OrderItem = $event->getData(); |
184 | 184 | $TaxDisplayType = $OrderItem->getTaxDisplayType(); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | |
197 | 197 | $event->setData($OrderItem); |
198 | 198 | }); |
199 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
199 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
200 | 200 | // モーダルからのPOST時に、金額等をセットする. |
201 | 201 | if ('modal' === $this->requestStack->getCurrentRequest()->get('modal')) { |
202 | 202 | $data = $event->getData(); |
@@ -266,17 +266,13 @@ discard block |
||
266 | 266 | $data['product_name'] = $Product->getName(); |
267 | 267 | $data['product_code'] = $ProductClass->getCode(); |
268 | 268 | $data['class_name1'] = $ProductClass->hasClassCategory1() ? |
269 | - $ProductClass->getClassCategory1()->getClassName() : |
|
270 | - null; |
|
269 | + $ProductClass->getClassCategory1()->getClassName() : null; |
|
271 | 270 | $data['class_name2'] = $ProductClass->hasClassCategory2() ? |
272 | - $ProductClass->getClassCategory2()->getClassName() : |
|
273 | - null; |
|
271 | + $ProductClass->getClassCategory2()->getClassName() : null; |
|
274 | 272 | $data['class_category_name1'] = $ProductClass->hasClassCategory1() ? |
275 | - $ProductClass->getClassCategory1()->getName() : |
|
276 | - null; |
|
273 | + $ProductClass->getClassCategory1()->getName() : null; |
|
277 | 274 | $data['class_category_name2'] = $ProductClass->hasClassCategory2() ? |
278 | - $ProductClass->getClassCategory2()->getName() : |
|
279 | - null; |
|
275 | + $ProductClass->getClassCategory2()->getName() : null; |
|
280 | 276 | $data['price'] = $ProductClass->getPrice02(); |
281 | 277 | $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity']; |
282 | 278 | $data['tax_type'] = TaxType::TAXATION; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | 'label' => false, |
47 | 47 | 'class' => 'Eccube\Entity\Page', |
48 | 48 | 'choice_label' => 'name', |
49 | - 'query_builder' => function (EntityRepository $er) { |
|
49 | + 'query_builder' => function(EntityRepository $er) { |
|
50 | 50 | return $er |
51 | 51 | ->createQueryBuilder('l') |
52 | 52 | ->where('l.id <> 0') |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | foreach ($data as $row) { |
191 | 191 | |
192 | 192 | if ($headerSize != count($row)) { |
193 | - $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。'); |
|
193 | + $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。'); |
|
194 | 194 | return $this->render($app, $form, $headers); |
195 | 195 | } |
196 | 196 | |
@@ -201,33 +201,33 @@ discard block |
||
201 | 201 | if (preg_match('/^\d+$/', $row['商品ID'])) { |
202 | 202 | $Product = $this->productRepository->find($row['商品ID']); |
203 | 203 | if (!$Product) { |
204 | - $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。'); |
|
204 | + $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。'); |
|
205 | 205 | return $this->render($app, $form, $headers); |
206 | 206 | } |
207 | 207 | } else { |
208 | - $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。'); |
|
208 | + $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。'); |
|
209 | 209 | return $this->render($app, $form, $headers); |
210 | 210 | } |
211 | 211 | |
212 | 212 | } |
213 | 213 | |
214 | 214 | if ($row['公開ステータス(ID)'] == '') { |
215 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が設定されていません。'); |
|
215 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が設定されていません。'); |
|
216 | 216 | } else { |
217 | 217 | if (preg_match('/^\d+$/', $row['公開ステータス(ID)'])) { |
218 | 218 | $ProductStatus = $this->productStatusRepository->find($row['公開ステータス(ID)']); |
219 | 219 | if (!$ProductStatus) { |
220 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。'); |
|
220 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。'); |
|
221 | 221 | } else { |
222 | 222 | $Product->setStatus($ProductStatus); |
223 | 223 | } |
224 | 224 | } else { |
225 | - $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。'); |
|
225 | + $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。'); |
|
226 | 226 | } |
227 | 227 | } |
228 | 228 | |
229 | 229 | if (Str::isBlank($row['商品名'])) { |
230 | - $this->addErrors(($data->key() + 1) . '行目の商品名が設定されていません。'); |
|
230 | + $this->addErrors(($data->key() + 1).'行目の商品名が設定されていません。'); |
|
231 | 231 | return $this->render($app, $form, $headers); |
232 | 232 | } else { |
233 | 233 | $Product->setName(Str::trimAll($row['商品名'])); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) { |
287 | 287 | $ProductClassOrg->setDeliveryFee($deliveryFee); |
288 | 288 | } else { |
289 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
289 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
290 | 290 | } |
291 | 291 | } |
292 | 292 | } |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | if ($row['規格分類1(ID)'] != '') { |
295 | 295 | |
296 | 296 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
297 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
297 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
298 | 298 | } else { |
299 | 299 | // 商品規格あり |
300 | 300 | // 企画分類あり商品を作成 |
@@ -309,30 +309,30 @@ discard block |
||
309 | 309 | if (preg_match('/^\d+$/', $row['規格分類1(ID)'])) { |
310 | 310 | $ClassCategory1 = $this->classCategoryRepository->find($row['規格分類1(ID)']); |
311 | 311 | if (!$ClassCategory1) { |
312 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
312 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
313 | 313 | } else { |
314 | 314 | $ProductClass->setClassCategory1($ClassCategory1); |
315 | 315 | } |
316 | 316 | } else { |
317 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
317 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
318 | 318 | } |
319 | 319 | |
320 | 320 | if ($row['規格分類2(ID)'] != '') { |
321 | 321 | if (preg_match('/^\d+$/', $row['規格分類2(ID)'])) { |
322 | 322 | $ClassCategory2 = $this->classCategoryRepository->find($row['規格分類2(ID)']); |
323 | 323 | if (!$ClassCategory2) { |
324 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
324 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
325 | 325 | } else { |
326 | 326 | if ($ClassCategory1 && |
327 | 327 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
328 | 328 | ) { |
329 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
329 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
330 | 330 | } else { |
331 | 331 | $ProductClass->setClassCategory2($ClassCategory2); |
332 | 332 | } |
333 | 333 | } |
334 | 334 | } else { |
335 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
335 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
336 | 336 | } |
337 | 337 | } |
338 | 338 | $ProductClass->setProductStock($ProductStock); |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | |
345 | 345 | } else { |
346 | 346 | if ($row['規格分類2(ID)'] != '') { |
347 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
347 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
348 | 348 | } |
349 | 349 | } |
350 | 350 | |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) { |
373 | 373 | $pc->setDeliveryFee($deliveryFee); |
374 | 374 | } else { |
375 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
375 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
376 | 376 | } |
377 | 377 | } |
378 | 378 | } |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | } |
395 | 395 | |
396 | 396 | if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) { |
397 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
397 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。'); |
|
398 | 398 | } else { |
399 | 399 | |
400 | 400 | // 必ず規格分類1がセットされている |
@@ -403,36 +403,36 @@ discard block |
||
403 | 403 | if (preg_match('/^\d+$/', $classCategoryId1)) { |
404 | 404 | $ClassCategory1 = $this->classCategoryRepository->find($classCategoryId1); |
405 | 405 | if (!$ClassCategory1) { |
406 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
406 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
407 | 407 | } |
408 | 408 | } else { |
409 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
409 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
410 | 410 | } |
411 | 411 | |
412 | 412 | $ClassCategory2 = null; |
413 | 413 | if ($row['規格分類2(ID)'] != '') { |
414 | 414 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() == null) { |
415 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)は設定できません。'); |
|
415 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)は設定できません。'); |
|
416 | 416 | } else { |
417 | 417 | if (preg_match('/^\d+$/', $classCategoryId2)) { |
418 | 418 | $ClassCategory2 = $this->classCategoryRepository->find($classCategoryId2); |
419 | 419 | if (!$ClassCategory2) { |
420 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
420 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
421 | 421 | } else { |
422 | 422 | if ($ClassCategory1 && |
423 | 423 | ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId()) |
424 | 424 | ) { |
425 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
425 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。'); |
|
426 | 426 | } |
427 | 427 | } |
428 | 428 | } else { |
429 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
429 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
430 | 430 | } |
431 | 431 | |
432 | 432 | } |
433 | 433 | } else { |
434 | 434 | if ($pc->getClassCategory1() != null && $pc->getClassCategory2() != null) { |
435 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)に値を設定してください。'); |
|
435 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)に値を設定してください。'); |
|
436 | 436 | } |
437 | 437 | } |
438 | 438 | $ProductClass = $this->createProductClass($row, $Product, $app, $data, $ClassCategory1, $ClassCategory2); |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) { |
444 | 444 | $ProductClass->setDeliveryFee($deliveryFee); |
445 | 445 | } else { |
446 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
446 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
447 | 447 | } |
448 | 448 | } |
449 | 449 | } |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | foreach ($data as $row) { |
534 | 534 | |
535 | 535 | if ($headerSize != count($row)) { |
536 | - $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。'); |
|
536 | + $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。'); |
|
537 | 537 | return $this->render($app, $form, $headers); |
538 | 538 | } |
539 | 539 | |
@@ -541,23 +541,23 @@ discard block |
||
541 | 541 | $Category = new Category(); |
542 | 542 | } else { |
543 | 543 | if (!preg_match('/^\d+$/', $row['カテゴリID'])) { |
544 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
|
544 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。'); |
|
545 | 545 | return $this->render($app, $form, $headers); |
546 | 546 | } |
547 | 547 | $Category = $this->categoryRepository->find($row['カテゴリID']); |
548 | 548 | if (!$Category) { |
549 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。'); |
|
549 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。'); |
|
550 | 550 | return $this->render($app, $form, $headers); |
551 | 551 | } |
552 | 552 | if ($row['カテゴリID'] == $row['親カテゴリID']) { |
553 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリIDと親カテゴリIDが同じです。'); |
|
553 | + $this->addErrors(($data->key() + 1).'行目のカテゴリIDと親カテゴリIDが同じです。'); |
|
554 | 554 | return $this->render($app, $form, $headers); |
555 | 555 | } |
556 | 556 | |
557 | 557 | } |
558 | 558 | |
559 | 559 | if (Str::isBlank($row['カテゴリ名'])) { |
560 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリ名が設定されていません。'); |
|
560 | + $this->addErrors(($data->key() + 1).'行目のカテゴリ名が設定されていません。'); |
|
561 | 561 | return $this->render($app, $form, $headers); |
562 | 562 | } else { |
563 | 563 | $Category->setName(Str::trimAll($row['カテゴリ名'])); |
@@ -566,13 +566,13 @@ discard block |
||
566 | 566 | if ($row['親カテゴリID'] != '') { |
567 | 567 | |
568 | 568 | if (!preg_match('/^\d+$/', $row['親カテゴリID'])) { |
569 | - $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。'); |
|
569 | + $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。'); |
|
570 | 570 | return $this->render($app, $form, $headers); |
571 | 571 | } |
572 | 572 | |
573 | 573 | $ParentCategory = $this->categoryRepository->find($row['親カテゴリID']); |
574 | 574 | if (!$ParentCategory) { |
575 | - $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。'); |
|
575 | + $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。'); |
|
576 | 576 | return $this->render($app, $form, $headers); |
577 | 577 | } |
578 | 578 | |
@@ -588,14 +588,14 @@ discard block |
||
588 | 588 | } |
589 | 589 | |
590 | 590 | if ($this->appConfig['category_nest_level'] < $Category->getHierarchy()) { |
591 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリが最大レベルを超えているため設定できません。'); |
|
591 | + $this->addErrors(($data->key() + 1).'行目のカテゴリが最大レベルを超えているため設定できません。'); |
|
592 | 592 | return $this->render($app, $form, $headers); |
593 | 593 | } |
594 | 594 | |
595 | 595 | $status = $this->categoryRepository->save($Category); |
596 | 596 | |
597 | 597 | if (!$status) { |
598 | - $this->addErrors(($data->key() + 1) . '行目のカテゴリが設定できません。'); |
|
598 | + $this->addErrors(($data->key() + 1).'行目のカテゴリが設定できません。'); |
|
599 | 599 | } |
600 | 600 | |
601 | 601 | if ($this->hasErrors()) { |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | throw new NotFoundHttpException(); |
643 | 643 | } |
644 | 644 | |
645 | - $response->setCallback(function () use ($app, $request, $headers) { |
|
645 | + $response->setCallback(function() use ($app, $request, $headers) { |
|
646 | 646 | |
647 | 647 | // ヘッダ行の出力 |
648 | 648 | $row = array(); |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | }); |
658 | 658 | |
659 | 659 | $response->headers->set('Content-Type', 'application/octet-stream'); |
660 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
660 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
661 | 661 | $response->send(); |
662 | 662 | |
663 | 663 | return $response; |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | if (!empty($this->fileName)) { |
681 | 681 | try { |
682 | 682 | $fs = new Filesystem(); |
683 | - $fs->remove($this->appConfig['csv_temp_realdir'] . '/' . $this->fileName); |
|
683 | + $fs->remove($this->appConfig['csv_temp_realdir'].'/'.$this->fileName); |
|
684 | 684 | } catch (\Exception $e) { |
685 | 685 | // エラーが発生しても無視する |
686 | 686 | } |
@@ -703,10 +703,10 @@ discard block |
||
703 | 703 | protected function getImportData($app, $formFile) |
704 | 704 | { |
705 | 705 | // アップロードされたCSVファイルを一時ディレクトリに保存 |
706 | - $this->fileName = 'upload_' . Str::random() . '.' . $formFile->getClientOriginalExtension(); |
|
706 | + $this->fileName = 'upload_'.Str::random().'.'.$formFile->getClientOriginalExtension(); |
|
707 | 707 | $formFile->move($this->appConfig['csv_temp_realdir'], $this->fileName); |
708 | 708 | |
709 | - $file = file_get_contents($this->appConfig['csv_temp_realdir'] . '/' . $this->fileName); |
|
709 | + $file = file_get_contents($this->appConfig['csv_temp_realdir'].'/'.$this->fileName); |
|
710 | 710 | |
711 | 711 | if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID >= 70000) { |
712 | 712 | // Windows 環境の PHP7 の場合はファイルエンコーディングを CP932 に合わせる |
@@ -802,8 +802,8 @@ discard block |
||
802 | 802 | if (!$Category) { |
803 | 803 | $this->addErrors(($data->key() + 1).'行目の商品カテゴリ(ID)「'.$category.'」が存在しません。'); |
804 | 804 | } else { |
805 | - foreach($Category->getPath() as $ParentCategory){ |
|
806 | - if (!isset($categoriesIdList[$ParentCategory->getId()])){ |
|
805 | + foreach ($Category->getPath() as $ParentCategory) { |
|
806 | + if (!isset($categoriesIdList[$ParentCategory->getId()])) { |
|
807 | 807 | $ProductCategory = $this->makeProductCategory($Product, $ParentCategory, $rank); |
808 | 808 | $this->entityManager->persist($ProductCategory); |
809 | 809 | $rank++; |
@@ -811,7 +811,7 @@ discard block |
||
811 | 811 | $categoriesIdList[$ParentCategory->getId()] = true; |
812 | 812 | } |
813 | 813 | } |
814 | - if (!isset($categoriesIdList[$Category->getId()])){ |
|
814 | + if (!isset($categoriesIdList[$Category->getId()])) { |
|
815 | 815 | $ProductCategory = $this->makeProductCategory($Product, $Category, $rank); |
816 | 816 | $rank++; |
817 | 817 | $this->em->persist($ProductCategory); |
@@ -866,7 +866,7 @@ discard block |
||
866 | 866 | } |
867 | 867 | } |
868 | 868 | if (!$Tag) { |
869 | - $this->addErrors(($data->key() + 1) . '行目のタグ(ID)「' . $tag_id . '」が存在しません。'); |
|
869 | + $this->addErrors(($data->key() + 1).'行目のタグ(ID)「'.$tag_id.'」が存在しません。'); |
|
870 | 870 | } |
871 | 871 | } |
872 | 872 | } |
@@ -885,17 +885,17 @@ discard block |
||
885 | 885 | |
886 | 886 | |
887 | 887 | if ($row['商品種別(ID)'] == '') { |
888 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
888 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
889 | 889 | } else { |
890 | 890 | if (preg_match('/^\d+$/', $row['商品種別(ID)'])) { |
891 | 891 | $ProductType = $this->productTypeRepository->find($row['商品種別(ID)']); |
892 | 892 | if (!$ProductType) { |
893 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
893 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
894 | 894 | } else { |
895 | 895 | $ProductClass->setProductType($ProductType); |
896 | 896 | } |
897 | 897 | } else { |
898 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
898 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
899 | 899 | } |
900 | 900 | } |
901 | 901 | |
@@ -906,12 +906,12 @@ discard block |
||
906 | 906 | if (preg_match('/^\d+$/', $row['発送日目安(ID)'])) { |
907 | 907 | $DeliveryDate = $this->deliveryDateRepository->find($row['発送日目安(ID)']); |
908 | 908 | if (!$DeliveryDate) { |
909 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
909 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
910 | 910 | } else { |
911 | 911 | $ProductClass->setDeliveryDate($DeliveryDate); |
912 | 912 | } |
913 | 913 | } else { |
914 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
914 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
915 | 915 | } |
916 | 916 | } |
917 | 917 | |
@@ -922,19 +922,19 @@ discard block |
||
922 | 922 | } |
923 | 923 | |
924 | 924 | if ($row['在庫数無制限フラグ'] == '') { |
925 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
925 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
926 | 926 | } else { |
927 | 927 | if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
928 | 928 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
929 | 929 | // 在庫数が設定されていなければエラー |
930 | 930 | if ($row['在庫数'] == '') { |
931 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
931 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
932 | 932 | } else { |
933 | 933 | $stock = str_replace(',', '', $row['在庫数']); |
934 | 934 | if (preg_match('/^\d+$/', $stock) && $stock >= 0) { |
935 | 935 | $ProductClass->setStock($stock); |
936 | 936 | } else { |
937 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
937 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
938 | 938 | } |
939 | 939 | } |
940 | 940 | |
@@ -942,7 +942,7 @@ discard block |
||
942 | 942 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
943 | 943 | $ProductClass->setStock(null); |
944 | 944 | } else { |
945 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
945 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
946 | 946 | } |
947 | 947 | } |
948 | 948 | |
@@ -951,7 +951,7 @@ discard block |
||
951 | 951 | if (preg_match('/^\d+$/', $saleLimit) && $saleLimit >= 0) { |
952 | 952 | $ProductClass->setSaleLimit($saleLimit); |
953 | 953 | } else { |
954 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
954 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
955 | 955 | } |
956 | 956 | } |
957 | 957 | |
@@ -960,18 +960,18 @@ discard block |
||
960 | 960 | if (preg_match('/^\d+$/', $price01) && $price01 >= 0) { |
961 | 961 | $ProductClass->setPrice01($price01); |
962 | 962 | } else { |
963 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
963 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
964 | 964 | } |
965 | 965 | } |
966 | 966 | |
967 | 967 | if ($row['販売価格'] == '') { |
968 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
968 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
969 | 969 | } else { |
970 | 970 | $price02 = str_replace(',', '', $row['販売価格']); |
971 | 971 | if (preg_match('/^\d+$/', $price02) && $price02 >= 0) { |
972 | 972 | $ProductClass->setPrice02($price02); |
973 | 973 | } else { |
974 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
974 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
975 | 975 | } |
976 | 976 | } |
977 | 977 | |
@@ -980,7 +980,7 @@ discard block |
||
980 | 980 | if (preg_match('/^\d+$/', $delivery_fee) && $delivery_fee >= 0) { |
981 | 981 | $ProductClass->setDeliveryFee($delivery_fee); |
982 | 982 | } else { |
983 | - $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。'); |
|
983 | + $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。'); |
|
984 | 984 | } |
985 | 985 | } |
986 | 986 | |
@@ -1013,17 +1013,17 @@ discard block |
||
1013 | 1013 | $ProductClass->setProduct($Product); |
1014 | 1014 | |
1015 | 1015 | if ($row['商品種別(ID)'] == '') { |
1016 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。'); |
|
1016 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。'); |
|
1017 | 1017 | } else { |
1018 | 1018 | if (preg_match('/^\d+$/', $row['商品種別(ID)'])) { |
1019 | 1019 | $ProductType = $this->productTypeRepository->find($row['商品種別(ID)']); |
1020 | 1020 | if (!$ProductType) { |
1021 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
1021 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
1022 | 1022 | } else { |
1023 | 1023 | $ProductClass->setProductType($ProductType); |
1024 | 1024 | } |
1025 | 1025 | } else { |
1026 | - $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。'); |
|
1026 | + $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。'); |
|
1027 | 1027 | } |
1028 | 1028 | } |
1029 | 1029 | |
@@ -1032,12 +1032,12 @@ discard block |
||
1032 | 1032 | if (preg_match('/^\d+$/', $row['規格分類1(ID)'])) { |
1033 | 1033 | $ClassCategory = $this->classCategoryRepository->find($row['規格分類1(ID)']); |
1034 | 1034 | if (!$ClassCategory) { |
1035 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
1035 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
1036 | 1036 | } else { |
1037 | 1037 | $ProductClass->setClassCategory1($ClassCategory); |
1038 | 1038 | } |
1039 | 1039 | } else { |
1040 | - $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。'); |
|
1040 | + $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。'); |
|
1041 | 1041 | } |
1042 | 1042 | } |
1043 | 1043 | |
@@ -1045,12 +1045,12 @@ discard block |
||
1045 | 1045 | if (preg_match('/^\d+$/', $row['規格分類2(ID)'])) { |
1046 | 1046 | $ClassCategory = $this->classCategoryRepository->find($row['規格分類2(ID)']); |
1047 | 1047 | if (!$ClassCategory) { |
1048 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
1048 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
1049 | 1049 | } else { |
1050 | 1050 | $ProductClass->setClassCategory2($ClassCategory); |
1051 | 1051 | } |
1052 | 1052 | } else { |
1053 | - $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。'); |
|
1053 | + $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。'); |
|
1054 | 1054 | } |
1055 | 1055 | } |
1056 | 1056 | |
@@ -1058,12 +1058,12 @@ discard block |
||
1058 | 1058 | if (preg_match('/^\d+$/', $row['発送日目安(ID)'])) { |
1059 | 1059 | $DeliveryDate = $this->deliveryDateRepository->find($row['発送日目安(ID)']); |
1060 | 1060 | if (!$DeliveryDate) { |
1061 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
1061 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
1062 | 1062 | } else { |
1063 | 1063 | $ProductClass->setDeliveryDate($DeliveryDate); |
1064 | 1064 | } |
1065 | 1065 | } else { |
1066 | - $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。'); |
|
1066 | + $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。'); |
|
1067 | 1067 | } |
1068 | 1068 | } |
1069 | 1069 | |
@@ -1074,19 +1074,19 @@ discard block |
||
1074 | 1074 | } |
1075 | 1075 | |
1076 | 1076 | if ($row['在庫数無制限フラグ'] == '') { |
1077 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
1077 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
1078 | 1078 | } else { |
1079 | 1079 | if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) { |
1080 | 1080 | $ProductClass->setStockUnlimited(Constant::DISABLED); |
1081 | 1081 | // 在庫数が設定されていなければエラー |
1082 | 1082 | if ($row['在庫数'] == '') { |
1083 | - $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。'); |
|
1083 | + $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。'); |
|
1084 | 1084 | } else { |
1085 | 1085 | $stock = str_replace(',', '', $row['在庫数']); |
1086 | 1086 | if (preg_match('/^\d+$/', $stock) && $stock >= 0) { |
1087 | 1087 | $ProductClass->setStock($row['在庫数']); |
1088 | 1088 | } else { |
1089 | - $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。'); |
|
1089 | + $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。'); |
|
1090 | 1090 | } |
1091 | 1091 | } |
1092 | 1092 | |
@@ -1094,7 +1094,7 @@ discard block |
||
1094 | 1094 | $ProductClass->setStockUnlimited(Constant::ENABLED); |
1095 | 1095 | $ProductClass->setStock(null); |
1096 | 1096 | } else { |
1097 | - $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。'); |
|
1097 | + $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。'); |
|
1098 | 1098 | } |
1099 | 1099 | } |
1100 | 1100 | |
@@ -1103,7 +1103,7 @@ discard block |
||
1103 | 1103 | if (preg_match('/^\d+$/', $saleLimit) && $saleLimit >= 0) { |
1104 | 1104 | $ProductClass->setSaleLimit($saleLimit); |
1105 | 1105 | } else { |
1106 | - $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。'); |
|
1106 | + $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。'); |
|
1107 | 1107 | } |
1108 | 1108 | } |
1109 | 1109 | |
@@ -1112,18 +1112,18 @@ discard block |
||
1112 | 1112 | if (preg_match('/^\d+$/', $price01) && $price01 >= 0) { |
1113 | 1113 | $ProductClass->setPrice01($price01); |
1114 | 1114 | } else { |
1115 | - $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。'); |
|
1115 | + $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。'); |
|
1116 | 1116 | } |
1117 | 1117 | } |
1118 | 1118 | |
1119 | 1119 | if ($row['販売価格'] == '') { |
1120 | - $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。'); |
|
1120 | + $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。'); |
|
1121 | 1121 | } else { |
1122 | 1122 | $price02 = str_replace(',', '', $row['販売価格']); |
1123 | 1123 | if (preg_match('/^\d+$/', $price02) && $price02 >= 0) { |
1124 | 1124 | $ProductClass->setPrice02($price02); |
1125 | 1125 | } else { |
1126 | - $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。'); |
|
1126 | + $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。'); |
|
1127 | 1127 | } |
1128 | 1128 | } |
1129 | 1129 |