Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/2.3-develop' into libs-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Joan He committed Apr 10, 2018
2 parents c590fa2 + 94ccd58 commit a593d09
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ public function getPopupTitle()
$messageCount = count($this->_messages->getUnread());
if ($messageCount > 1) {
return __('You have %1 new system messages', $messageCount);
} else {
return __('You have %1 new system message', $messageCount);
}
return __('You have %1 new system message', $messageCount);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions app/code/Magento/AdminNotification/Block/Window.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ protected function _getLatestItem()
{
if ($this->_latestItem == null) {
$items = array_values($this->_criticalCollection->getItems());
$this->_latestItem = false;
if (count($items)) {
$this->_latestItem = $items[0];
} else {
$this->_latestItem = false;
}
}
return $this->_latestItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,8 @@ protected function _getCustomerGroupById(
): string {
if ($allGroups !== 0) {
return ImportAdvancedPricing::VALUE_ALL_GROUPS;
} else {
return $this->_groupRepository->getById($groupId)->getCode();
}
return $this->_groupRepository->getById($groupId)->getCode();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,8 @@ protected function deleteProductTierPrices(array $listSku, $table)
$this->addRowError(ValidatorInterface::ERROR_SKU_IS_EMPTY, 0);
return false;
}
} else {
return false;
}
return false;
}

/**
Expand Down
7 changes: 1 addition & 6 deletions app/code/Magento/Analytics/Model/Config/Backend/Enabled.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,7 @@ public function afterSave()
try {
if ($this->isValueChanged()) {
$enabled = $this->getData('value');

if ($enabled) {
$this->subscriptionHandler->processEnabled();
} else {
$this->subscriptionHandler->processDisabled();
}
$enabled ? $this->subscriptionHandler->processEnabled() : $this->subscriptionHandler->processDisabled();
}
} catch (\Exception $e) {
$this->_logger->error($e->getMessage());
Expand Down
3 changes: 1 addition & 2 deletions app/code/Magento/Authorization/Model/ResourceModel/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $role)
}

if (!$role->getTreeLevel()) {
$treeLevel = 0;
if ($role->getPid() > 0) {
$select = $this->getConnection()->select()->from(
$this->getMainTable(),
Expand All @@ -79,8 +80,6 @@ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $role)
$binds = ['pid' => (int)$role->getPid()];

$treeLevel = $this->getConnection()->fetchOne($select, $binds);
} else {
$treeLevel = 0;
}

$role->setTreeLevel($treeLevel + 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Magento\Cms\Model\ResourceModel\Block\Grid;

use Magento\Framework\Api\Search\SearchResultInterface;
use Magento\Framework\Search\AggregationInterface;
use Magento\Framework\Api\Search\AggregationInterface;
use Magento\Cms\Model\ResourceModel\Block\Collection as BlockCollection;

/**
Expand Down Expand Up @@ -82,6 +82,7 @@ public function getAggregations()
public function setAggregations($aggregations)
{
$this->aggregations = $aggregations;
return $this;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public function getAggregations()
public function setAggregations($aggregations)
{
$this->aggregations = $aggregations;
return $this;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Magento\Sales\Model\ResourceModel\Grid;

use Magento\Framework\Api\Search\SearchResultInterface;
use Magento\Framework\Search\AggregationInterface;
use Magento\Framework\Api\Search\AggregationInterface;
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

/**
Expand Down Expand Up @@ -78,6 +78,7 @@ public function getAggregations()
public function setAggregations($aggregations)
{
$this->aggregations = $aggregations;
return $this;
}

/**
Expand Down

0 comments on commit a593d09

Please sign in to comment.