Skip to content

Commit

Permalink
MAGETWO-86743: Optimization: magento/module-tax is_null change to str…
Browse files Browse the repository at this point in the history
…ict comparison #13170
  • Loading branch information
ishakhsuvarov authored Jan 16, 2018
2 parents 74fedd5 + 1db80fc commit 9ceb40a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/code/Magento/Tax/Model/Calculation/Rate.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function afterDelete()
*/
public function saveTitles($titles = null)
{
if (is_null($titles)) {
if ($titles === null) {
$titles = $this->getTitle();
}

Expand Down Expand Up @@ -256,7 +256,7 @@ public function saveTitles($titles = null)
*/
public function getTitleModel()
{
if (is_null($this->_titleModel)) {
if ($this->_titleModel === null) {
$this->_titleModel = $this->_titleFactory->create();
}
return $this->_titleModel;
Expand All @@ -270,7 +270,7 @@ public function getTitles()
if ($this->getData(self::KEY_TITLES)) {
return $this->getData(self::KEY_TITLES);
}
if (is_null($this->_titles)) {
if ($this->_titles === null) {
$this->_titles = $this->getTitleModel()->getCollection()->loadByRateId($this->getId())->getItems();
}
return $this->_titles;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ protected function _saveAppliedTaxes(
$previouslyAppliedTaxes[$row['id']] = $row;
}

if (!is_null($row['percent'])) {
if ($row['percent'] !== null) {
$row['percent'] = $row['percent'] ? $row['percent'] : 1;
$rate = $rate ? $rate : 1;

Expand Down

0 comments on commit 9ceb40a

Please sign in to comment.