Skip to content

Commit

Permalink
Merge pull request #274 from magento-goinc/MAGETWO-46245
Browse files Browse the repository at this point in the history
[SWAT] - MAGETWO-46245
  • Loading branch information
Slabko,Michael(mslabko) committed Jan 12, 2016
2 parents c5ee5ae + 32a45c0 commit 880ad3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ protected function groupUrls($urls)
{
$groups =[];
foreach ($urls as $url) {
$key = sprintf('%s-%s',
$key = sprintf(
'%s-%s',
$url->getEntityId(),
$url->getStoreId()
);
Expand Down Expand Up @@ -222,13 +223,13 @@ protected function replaceUrls(array $productUrls)
/**
* Add increment to every URL in array
*
* @param $productUrls
* @param $increment
* @param array $productUrls
* @param int $increment
* @return $this
*/
protected function addIncrementToUrls(array & $productUrls, $increment)
{
foreach($productUrls as $productUrl) {
foreach ($productUrls as $productUrl) {
$requestPath = substr($productUrl->getRequestPath(), 0, -strlen($productUrl->getUrlSuffix()));
$requestPath = sprintf('%s-%s%s', $requestPath, $increment, $productUrl->getUrlSuffix());
$productUrl->setRequestPath($requestPath);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/UrlRewrite/Service/V1/Data/UrlRewrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class UrlRewrite extends AbstractSimpleObject

/**
* URL suffix for rewrite (used in import)
* @var
* @var string
*/
protected $urlSuffix;

Expand Down

0 comments on commit 880ad3a

Please sign in to comment.