@@ -57,7 +57,7 @@ |
||
57 | 57 | return ProcessResult::success(); |
58 | 58 | } |
59 | 59 | |
60 | - $orderCode = preg_replace_callback('/\${(.*)}/U', function ($matches) use ($Order) { |
|
60 | + $orderCode = preg_replace_callback('/\${(.*)}/U', function($matches) use ($Order) { |
|
61 | 61 | if (count($matches) == 2) { |
62 | 62 | switch ($matches[1]) { |
63 | 63 | case 'yyyy': |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | { |
350 | 350 | $config = $this->eccubeConfig; |
351 | 351 | |
352 | - return function ($value) use ($config) { |
|
352 | + return function($value) use ($config) { |
|
353 | 353 | return mb_convert_encoding( |
354 | 354 | (string) $value, $config['eccube_csv_export_encoding'], 'UTF-8' |
355 | 355 | ); |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | if ($Conditions instanceof ArrayCollection) { |
490 | 490 | $Conditions = new ArrayCollection( |
491 | 491 | array_map( |
492 | - function ($Entity) use ($em) { |
|
492 | + function($Entity) use ($em) { |
|
493 | 493 | return $em->getRepository(get_class($Entity))->find($Entity->getId()); |
494 | 494 | }, $Conditions->toArray() |
495 | 495 | ) |
@@ -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 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public function getProductClasses() |
38 | 38 | { |
39 | 39 | return $this->filter( |
40 | - function (ItemInterface $OrderItem) { |
|
40 | + function(ItemInterface $OrderItem) { |
|
41 | 41 | return $OrderItem->isProduct(); |
42 | 42 | }); |
43 | 43 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function getDeliveryFees() |
46 | 46 | { |
47 | 47 | return $this->filter( |
48 | - function (ItemInterface $OrderItem) { |
|
48 | + function(ItemInterface $OrderItem) { |
|
49 | 49 | return $OrderItem->isDeliveryFee(); |
50 | 50 | }); |
51 | 51 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | public function getCharges() |
54 | 54 | { |
55 | 55 | return $this->filter( |
56 | - function (ItemInterface $OrderItem) { |
|
56 | + function(ItemInterface $OrderItem) { |
|
57 | 57 | return $OrderItem->isCharge(); |
58 | 58 | }); |
59 | 59 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | public function getDiscounts() |
62 | 62 | { |
63 | 63 | return $this->filter( |
64 | - function (ItemInterface $OrderItem) { |
|
64 | + function(ItemInterface $OrderItem) { |
|
65 | 65 | return $OrderItem->isDiscount(); |
66 | 66 | }); |
67 | 67 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | public function hasProductByName($productName) |
75 | 75 | { |
76 | 76 | $OrderItems = $this->filter( |
77 | - function (ItemInterface $OrderItem) use ($productName) { |
|
77 | + function(ItemInterface $OrderItem) use ($productName) { |
|
78 | 78 | /* @var OrderItem $OrderItem */ |
79 | 79 | return $OrderItem->getProductName() == $productName; |
80 | 80 | }); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function hasItemByOrderItemType($OrderItemType) |
93 | 93 | { |
94 | - $filteredItems = $this->filter(function (ItemInterface $OrderItem) use ($OrderItemType) { |
|
94 | + $filteredItems = $this->filter(function(ItemInterface $OrderItem) use ($OrderItemType) { |
|
95 | 95 | /* @var OrderItem $OrderItem */ |
96 | 96 | return $OrderItem->getOrderItemType() && $OrderItem->getOrderItemType()->getId() == $OrderItemType->getId(); |
97 | 97 | }); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
31 | 31 | $installedLogs = array_filter( |
32 | 32 | array_map( |
33 | - function ($line) { |
|
33 | + function($line) { |
|
34 | 34 | $matches = []; |
35 | 35 | preg_match('/^ - Installing (.*?) \((.*?)\) .*/', $line, $matches); |
36 | 36 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | public static function parseInfo($output) |
55 | 55 | { |
56 | 56 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
57 | - $infoLogs = array_filter(array_map(function ($line) { |
|
57 | + $infoLogs = array_filter(array_map(function($line) { |
|
58 | 58 | $matches = []; |
59 | 59 | preg_match('/^(name|descrip.|keywords|versions|type|license|source|dist|names)\s*:\s*(.*)$/', $line, $matches); |
60 | 60 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | public static function parseConfig($output) |
80 | 80 | { |
81 | 81 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
82 | - $rowArray = array_filter($rowArray, function ($line) { |
|
82 | + $rowArray = array_filter($rowArray, function($line) { |
|
83 | 83 | return !preg_match('/^<warning>.*/', $line); |
84 | 84 | }); |
85 | 85 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | public static function parseList($output) |
97 | 97 | { |
98 | 98 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
99 | - $rawConfig = array_map(function ($line) { |
|
99 | + $rawConfig = array_map(function($line) { |
|
100 | 100 | $matches = []; |
101 | 101 | preg_match('/^\[(.*?)\]\s?(.*)$/', $line, $matches); |
102 | 102 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | public static function parseComposerVersion($output) |
157 | 157 | { |
158 | 158 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
159 | - $rowArray = array_filter($rowArray, function ($line) { |
|
159 | + $rowArray = array_filter($rowArray, function($line) { |
|
160 | 160 | return preg_match('/^Composer */', $line); |
161 | 161 | }); |
162 | 162 |
@@ -118,13 +118,13 @@ discard block |
||
118 | 118 | $includedFileSets[] = $includedFiles; |
119 | 119 | } |
120 | 120 | |
121 | - $declaredTraits = array_map(function ($fqcn) { |
|
121 | + $declaredTraits = array_map(function($fqcn) { |
|
122 | 122 | // FQCNが'\'で始まるように正規化 |
123 | 123 | return strpos($fqcn, '\\') === 0 ? $fqcn : '\\'.$fqcn; |
124 | 124 | }, get_declared_traits()); |
125 | 125 | |
126 | 126 | // ディレクトリセットに含まれるTraitの一覧を作成 |
127 | - $traitSets = array_map(function () { return []; }, $dirSets); |
|
127 | + $traitSets = array_map(function() { return []; }, $dirSets); |
|
128 | 128 | foreach ($declaredTraits as $className) { |
129 | 129 | $rc = new \ReflectionClass($className); |
130 | 130 | $sourceFile = $rc->getFileName(); |
@@ -205,9 +205,9 @@ discard block |
||
205 | 205 | $traitsTokens = array_slice($entityTokens->toArray(), $useTraitIndex + 1, $useTraitEndIndex - $useTraitIndex - 1); |
206 | 206 | |
207 | 207 | // Trait名の配列に変換 |
208 | - $traitNames = explode(',', implode(array_map(function ($token) { |
|
208 | + $traitNames = explode(',', implode(array_map(function($token) { |
|
209 | 209 | return $token->getContent(); |
210 | - }, array_filter($traitsTokens, function ($token) { |
|
210 | + }, array_filter($traitsTokens, function($token) { |
|
211 | 211 | return $token->getId() != T_WHITESPACE; |
212 | 212 | })))); |
213 | 213 |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | |
158 | 158 | // 明細情報の設定 |
159 | 159 | $OrderItems = $this->createOrderItemsFromCartItems($CartItems); |
160 | - $OrderItemsGroupBySaleType = array_reduce($OrderItems, function ($result, $item) { |
|
160 | + $OrderItemsGroupBySaleType = array_reduce($OrderItems, function($result, $item) { |
|
161 | 161 | /* @var OrderItem $item */ |
162 | 162 | $saleTypeId = $item->getProductClass()->getSaleType()->getId(); |
163 | 163 | $result[$saleTypeId][] = $item; |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | $TaxExclude = $this->entityManager->getRepository(TaxDisplayType::class)->find(TaxDisplayType::EXCLUDED); |
252 | 252 | $Taxion = $this->entityManager->getRepository(TaxType::class)->find(TaxType::TAXATION); |
253 | 253 | |
254 | - return array_map(function ($item) use ($ProductItemType, $TaxExclude, $Taxion) { |
|
254 | + return array_map(function($item) use ($ProductItemType, $TaxExclude, $Taxion) { |
|
255 | 255 | /* @var $item CartItem */ |
256 | 256 | /* @var $ProductClass \Eccube\Entity\ProductClass */ |
257 | 257 | $ProductClass = $item->getProductClass(); |
@@ -603,7 +603,7 @@ |
||
603 | 603 | */ |
604 | 604 | public function getShippingNotifyMailBody(Shipping $Shipping, Order $Order, MailTemplate $MailTemplate = null) |
605 | 605 | { |
606 | - $ShippingItems = array_filter($Shipping->getOrderItems()->toArray(), function (OrderItem $OrderItem) use ($Order) { |
|
606 | + $ShippingItems = array_filter($Shipping->getOrderItems()->toArray(), function(OrderItem $OrderItem) use ($Order) { |
|
607 | 607 | return $OrderItem->getOrderId() === $Order->getId(); |
608 | 608 | }); |
609 | 609 |
@@ -51,7 +51,7 @@ |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | // CSV Reader に設定 |
54 | - $this->file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::READ_AHEAD | \SplFileObject::SKIP_EMPTY | \SplFileObject::DROP_NEW_LINE); |
|
54 | + $this->file->setFlags(\SplFileObject::READ_CSV|\SplFileObject::READ_AHEAD|\SplFileObject::SKIP_EMPTY|\SplFileObject::DROP_NEW_LINE); |
|
55 | 55 | |
56 | 56 | // ヘッダ行を取得 |
57 | 57 | $headers = $this->file->current(); |