From f293d1603a5fd6f40e323b9dda3f5786b93aff92 Mon Sep 17 00:00:00 2001 From: Richard McLeod <richard@wearejh.com> Date: Wed, 25 Mar 2015 08:54:12 +0000 Subject: [PATCH] Fixed occurances of implode with wrong argument order --- app/code/Magento/Fedex/Setup/InstallData.php | 2 +- .../Payment/view/adminhtml/templates/info/default.phtml | 2 +- .../Payment/view/adminhtml/templates/info/pdf/default.phtml | 4 ++-- .../Payment/view/frontend/templates/info/default.phtml | 2 +- .../Magento/Sales/Block/Adminhtml/Reorder/Renderer/Action.php | 2 +- .../Magento/SalesRule/Model/Resource/Report/Collection.php | 2 +- app/code/Magento/Tax/Setup/InstallData.php | 2 +- .../Test/Constraint/AssertChildProductsInGrid.php | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Fedex/Setup/InstallData.php b/app/code/Magento/Fedex/Setup/InstallData.php index ce35f998002..55363c9acc3 100755 --- a/app/code/Magento/Fedex/Setup/InstallData.php +++ b/app/code/Magento/Fedex/Setup/InstallData.php @@ -96,7 +96,7 @@ class InstallData implements InstallDataInterface $mapNew[] = $shippingMethod; } } - $mapNew = implode($mapNew, ','); + $mapNew = implode(',', $mapNew); } else { continue; } diff --git a/app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml b/app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml index 48a8c0a91db..f2db06784d9 100644 --- a/app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml +++ b/app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml @@ -19,7 +19,7 @@ <?php foreach ($_specificInfo as $_label => $_value):?> <tr> <th><?php echo $block->escapeHtml($_label)?>:</th> - <td><?php echo nl2br(implode($block->getValueAsArray($_value, true), "\n"))?></td> + <td><?php echo nl2br(implode("\n", $block->getValueAsArray($_value, true)))?></td> </tr> <?php endforeach; ?> </table> diff --git a/app/code/Magento/Payment/view/adminhtml/templates/info/pdf/default.phtml b/app/code/Magento/Payment/view/adminhtml/templates/info/pdf/default.phtml index 89d131de11c..db51c499e28 100644 --- a/app/code/Magento/Payment/view/adminhtml/templates/info/pdf/default.phtml +++ b/app/code/Magento/Payment/view/adminhtml/templates/info/pdf/default.phtml @@ -16,8 +16,8 @@ <?php if ($_specificInfo = $block->getSpecificInformation()):?> <?php foreach ($_specificInfo as $_label => $_value):?> -<?php echo $_label ?>: <?php echo implode($block->getValueAsArray($_value), ' ')?>{{pdf_row_separator}} +<?php echo $_label ?>: <?php echo implode(' ', $block->getValueAsArray($_value))?>{{pdf_row_separator}} <?php endforeach; ?> <?php endif;?> -<?php echo implode($block->getChildPdfAsArray(), '{{pdf_row_separator}}') ?> +<?php echo implode('{{pdf_row_separator}}', $block->getChildPdfAsArray()) ?> diff --git a/app/code/Magento/Payment/view/frontend/templates/info/default.phtml b/app/code/Magento/Payment/view/frontend/templates/info/default.phtml index cbd9eb6f607..ae2a9e0b712 100644 --- a/app/code/Magento/Payment/view/frontend/templates/info/default.phtml +++ b/app/code/Magento/Payment/view/frontend/templates/info/default.phtml @@ -21,7 +21,7 @@ <?php foreach ($_specificInfo as $_label => $_value):?> <tr> <th scope="row"><?php echo $block->escapeHtml($_label)?></th> - <td><?php echo nl2br(implode($block->getValueAsArray($_value, true), "\n"))?></td> + <td><?php echo nl2br(implode("\n", $block->getValueAsArray($_value, true)))?></td> </tr> <?php endforeach; ?> </table> diff --git a/app/code/Magento/Sales/Block/Adminhtml/Reorder/Renderer/Action.php b/app/code/Magento/Sales/Block/Adminhtml/Reorder/Renderer/Action.php index 2690ecac411..0e664f92884 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Reorder/Renderer/Action.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Reorder/Renderer/Action.php @@ -93,7 +93,7 @@ class Action extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstract $attributesObject->setData($action['@']); $html[] = '<a ' . $attributesObject->serialize() . '>' . $action['#'] . '</a>'; } - return implode($html, ''); + return implode('', $html); } /** diff --git a/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php b/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php index 4c8dc6f0560..e1d3e1af29c 100644 --- a/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php +++ b/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php @@ -170,7 +170,7 @@ class Collection extends \Magento\Sales\Model\Resource\Report\Collection\Abstrac } if (!empty($rulesFilterSqlParts)) { - $this->getSelect()->where(implode($rulesFilterSqlParts, ' OR ')); + $this->getSelect()->where(implode(' OR ', $rulesFilterSqlParts)); } return $this; } diff --git a/app/code/Magento/Tax/Setup/InstallData.php b/app/code/Magento/Tax/Setup/InstallData.php index 03931a63e3b..4e99ca1631f 100644 --- a/app/code/Magento/Tax/Setup/InstallData.php +++ b/app/code/Magento/Tax/Setup/InstallData.php @@ -69,7 +69,7 @@ class InstallData implements InstallDataInterface 'visible_in_advanced_search' => true, 'used_in_product_listing' => true, 'unique' => false, - 'apply_to' => implode($taxSetup->getTaxableItems(), ',') + 'apply_to' => implode(',', $taxSetup->getTaxableItems()) ] ); diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductsInGrid.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductsInGrid.php index a467c0ad9af..557e1c09882 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductsInGrid.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertChildProductsInGrid.php @@ -52,7 +52,7 @@ class AssertChildProductsInGrid extends AbstractConstraint } } - \PHPUnit_Framework_Assert::assertEmpty($errors, implode($errors, ' ')); + \PHPUnit_Framework_Assert::assertEmpty($errors, implode(' ', $errors)); } /** -- GitLab