@@ -606,7 +606,7 @@ |
||
| 606 | 606 | */ |
| 607 | 607 | public function getShippingNotifyMailBody(Shipping $Shipping, Order $Order, MailTemplate $MailTemplate = null) |
| 608 | 608 | { |
| 609 | - $ShippingItems = array_filter($Shipping->getOrderItems()->toArray(), function (OrderItem $OrderItem) use ($Order) { |
|
| 609 | + $ShippingItems = array_filter($Shipping->getOrderItems()->toArray(), function(OrderItem $OrderItem) use ($Order) { |
|
| 610 | 610 | return $OrderItem->getOrderId() === $Order->getId(); |
| 611 | 611 | }); |
| 612 | 612 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | public function getProductClasses() |
| 27 | 27 | { |
| 28 | 28 | return $this->filter( |
| 29 | - function (ItemInterface $OrderItem) { |
|
| 29 | + function(ItemInterface $OrderItem) { |
|
| 30 | 30 | return $OrderItem->isProduct(); |
| 31 | 31 | }); |
| 32 | 32 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | public function getDeliveryFees() |
| 35 | 35 | { |
| 36 | 36 | return $this->filter( |
| 37 | - function (ItemInterface $OrderItem) { |
|
| 37 | + function(ItemInterface $OrderItem) { |
|
| 38 | 38 | return $OrderItem->isDeliveryFee(); |
| 39 | 39 | }); |
| 40 | 40 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function getCharges() |
| 43 | 43 | { |
| 44 | 44 | return $this->filter( |
| 45 | - function (ItemInterface $OrderItem) { |
|
| 45 | + function(ItemInterface $OrderItem) { |
|
| 46 | 46 | return $OrderItem->isCharge(); |
| 47 | 47 | }); |
| 48 | 48 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | public function getDiscounts() |
| 51 | 51 | { |
| 52 | 52 | return $this->filter( |
| 53 | - function (ItemInterface $OrderItem) { |
|
| 53 | + function(ItemInterface $OrderItem) { |
|
| 54 | 54 | return $OrderItem->isDiscount(); |
| 55 | 55 | }); |
| 56 | 56 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | public function hasProductByName($productName) |
| 64 | 64 | { |
| 65 | 65 | $OrderItems = $this->filter( |
| 66 | - function (ItemInterface $OrderItem) use ($productName) { |
|
| 66 | + function(ItemInterface $OrderItem) use ($productName) { |
|
| 67 | 67 | /* @var OrderItem $OrderItem */ |
| 68 | 68 | return $OrderItem->getProductName() == $productName; |
| 69 | 69 | }); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function hasItemByOrderItemType($OrderItemType) |
| 82 | 82 | { |
| 83 | - $filteredItems = $this->filter(function (ItemInterface $OrderItem) use ($OrderItemType) { |
|
| 83 | + $filteredItems = $this->filter(function(ItemInterface $OrderItem) use ($OrderItemType) { |
|
| 84 | 84 | /* @var OrderItem $OrderItem */ |
| 85 | 85 | return $OrderItem->getOrderItemType() && $OrderItem->getOrderItemType()->getId() == $OrderItemType->getId(); |
| 86 | 86 | }); |
@@ -112,9 +112,9 @@ |
||
| 112 | 112 | |
| 113 | 113 | $this->file = $file; |
| 114 | 114 | $this->file->setFlags( |
| 115 | - \SplFileObject::READ_CSV | |
|
| 116 | - \SplFileObject::SKIP_EMPTY | |
|
| 117 | - \SplFileObject::READ_AHEAD | |
|
| 115 | + \SplFileObject::READ_CSV| |
|
| 116 | + \SplFileObject::SKIP_EMPTY| |
|
| 117 | + \SplFileObject::READ_AHEAD| |
|
| 118 | 118 | \SplFileObject::DROP_NEW_LINE |
| 119 | 119 | ); |
| 120 | 120 | $this->file->setCsvControl( |
@@ -128,13 +128,13 @@ discard block |
||
| 128 | 128 | $includedFileSets[] = $includedFiles; |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - $declaredTraits = array_map(function ($fqcn) { |
|
| 131 | + $declaredTraits = array_map(function($fqcn) { |
|
| 132 | 132 | // FQCNが'\'で始まるように正規化 |
| 133 | 133 | return strpos($fqcn, '\\') === 0 ? $fqcn : '\\'.$fqcn; |
| 134 | 134 | }, get_declared_traits()); |
| 135 | 135 | |
| 136 | 136 | // ディレクトリセットに含まれるTraitの一覧を作成 |
| 137 | - $traitSets = array_map(function () { return []; }, $dirSets); |
|
| 137 | + $traitSets = array_map(function() { return []; }, $dirSets); |
|
| 138 | 138 | foreach ($declaredTraits as $className) { |
| 139 | 139 | $rc = new \ReflectionClass($className); |
| 140 | 140 | $sourceFile = $rc->getFileName(); |
@@ -215,9 +215,9 @@ discard block |
||
| 215 | 215 | $traitsTokens = array_slice($entityTokens->toArray(), $useTraitIndex + 1, $useTraitEndIndex - $useTraitIndex - 1); |
| 216 | 216 | |
| 217 | 217 | // Trait名の配列に変換 |
| 218 | - $traitNames = explode(',', implode(array_map(function ($token) { |
|
| 218 | + $traitNames = explode(',', implode(array_map(function($token) { |
|
| 219 | 219 | return $token->getContent(); |
| 220 | - }, array_filter($traitsTokens, function ($token) { |
|
| 220 | + }, array_filter($traitsTokens, function($token) { |
|
| 221 | 221 | return $token->getId() != T_WHITESPACE; |
| 222 | 222 | })))); |
| 223 | 223 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
| 41 | 41 | $installedLogs = array_filter( |
| 42 | 42 | array_map( |
| 43 | - function ($line) { |
|
| 43 | + function($line) { |
|
| 44 | 44 | $matches = []; |
| 45 | 45 | preg_match('/^ - Installing (.*?) \((.*?)\) .*/', $line, $matches); |
| 46 | 46 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | public static function parseInfo($output) |
| 65 | 65 | { |
| 66 | 66 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
| 67 | - $infoLogs = array_filter(array_map(function ($line) { |
|
| 67 | + $infoLogs = array_filter(array_map(function($line) { |
|
| 68 | 68 | $matches = []; |
| 69 | 69 | preg_match('/^(name|descrip.|keywords|versions|type|license|source|dist|names)\s*:\s*(.*)$/', $line, $matches); |
| 70 | 70 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | public static function parseConfig($output) |
| 90 | 90 | { |
| 91 | 91 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
| 92 | - $rowArray = array_filter($rowArray, function ($line) { |
|
| 92 | + $rowArray = array_filter($rowArray, function($line) { |
|
| 93 | 93 | return !preg_match('/^<warning>.*/', $line); |
| 94 | 94 | }); |
| 95 | 95 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | public static function parseList($output) |
| 107 | 107 | { |
| 108 | 108 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
| 109 | - $rawConfig = array_map(function ($line) { |
|
| 109 | + $rawConfig = array_map(function($line) { |
|
| 110 | 110 | $matches = []; |
| 111 | 111 | preg_match('/^\[(.*?)\]\s?(.*)$/', $line, $matches); |
| 112 | 112 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | public static function parseComposerVersion($output) |
| 167 | 167 | { |
| 168 | 168 | $rowArray = explode(PHP_EOL, str_replace('\r\n', PHP_EOL, $output)); |
| 169 | - $rowArray = array_filter($rowArray, function ($line) { |
|
| 169 | + $rowArray = array_filter($rowArray, function($line) { |
|
| 170 | 170 | return preg_match('/^Composer */', $line); |
| 171 | 171 | }); |
| 172 | 172 | |
@@ -504,7 +504,7 @@ discard block |
||
| 504 | 504 | @mkdir($outputDir); |
| 505 | 505 | |
| 506 | 506 | $enabledPluginCodes = array_map( |
| 507 | - function ($p) { return $p->getCode(); }, |
|
| 507 | + function($p) { return $p->getCode(); }, |
|
| 508 | 508 | $this->pluginRepository->findAllEnabled() |
| 509 | 509 | ); |
| 510 | 510 | |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | } |
| 520 | 520 | } |
| 521 | 521 | |
| 522 | - $enabledPluginEntityDirs = array_map(function ($code) { |
|
| 522 | + $enabledPluginEntityDirs = array_map(function($code) { |
|
| 523 | 523 | return $this->projectRoot."/app/Plugin/${code}/Entity"; |
| 524 | 524 | }, $enabledPluginCodes); |
| 525 | 525 | |
@@ -948,7 +948,7 @@ discard block |
||
| 948 | 948 | { |
| 949 | 949 | $result = array_keys($packages); |
| 950 | 950 | if ($getVersion) { |
| 951 | - $result = array_map(function ($package, $version) { |
|
| 951 | + $result = array_map(function($package, $version) { |
|
| 952 | 952 | return $package.':'.$version; |
| 953 | 953 | }, array_keys($packages), array_values($packages)); |
| 954 | 954 | } |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | { |
| 360 | 360 | $config = $this->eccubeConfig; |
| 361 | 361 | |
| 362 | - return function ($value) use ($config) { |
|
| 362 | + return function($value) use ($config) { |
|
| 363 | 363 | return mb_convert_encoding( |
| 364 | 364 | (string) $value, $config['eccube_csv_export_encoding'], 'UTF-8' |
| 365 | 365 | ); |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | if ($Conditions instanceof ArrayCollection) { |
| 500 | 500 | $Conditions = new ArrayCollection( |
| 501 | 501 | array_map( |
| 502 | - function ($Entity) use ($em) { |
|
| 502 | + function($Entity) use ($em) { |
|
| 503 | 503 | return $em->getRepository(get_class($Entity))->find($Entity->getId()); |
| 504 | 504 | }, $Conditions->toArray() |
| 505 | 505 | ) |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | ->name('*.csv') |
| 50 | 50 | ->sort( |
| 51 | 51 | // 定義ファイルに記載の順にソート. |
| 52 | - function (\SplFileInfo $a, \SplFileInfo $b) use ($definition) { |
|
| 52 | + function(\SplFileInfo $a, \SplFileInfo $b) use ($definition) { |
|
| 53 | 53 | if (!isset($definition[$a->getFilename()])) { |
| 54 | 54 | throw new \Exception(sprintf('"%s" is undefined in %s', $a->getFilename())); |
| 55 | 55 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | // CSV Reader に設定 |
| 43 | - $this->file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::READ_AHEAD | \SplFileObject::SKIP_EMPTY | \SplFileObject::DROP_NEW_LINE); |
|
| 43 | + $this->file->setFlags(\SplFileObject::READ_CSV|\SplFileObject::READ_AHEAD|\SplFileObject::SKIP_EMPTY|\SplFileObject::DROP_NEW_LINE); |
|
| 44 | 44 | |
| 45 | 45 | // ヘッダ行を取得 |
| 46 | 46 | $headers = $this->file->current(); |