Skip to content

Commit 8dd4940

Browse files
author
Shkolyarenko, Serhiy(sshkolyarenko)
committed
Merge pull request #159 from magento-folks/bugfix_pr
[Folks]Bugfix
2 parents d69054c + bc4ea0d commit 8dd4940

File tree

496 files changed

+997
-863
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

496 files changed

+997
-863
lines changed

app/code/Magento/AdminNotification/Model/Feed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ protected function _construct()
114114
public function getFeedUrl()
115115
{
116116
$httpPath = $this->_backendConfig->isSetFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://';
117-
if (is_null($this->_feedUrl)) {
117+
if ($this->_feedUrl === null) {
118118
$this->_feedUrl = $httpPath . $this->_backendConfig->getValue(self::XML_FEED_URL_PATH);
119119
}
120120
return $this->_feedUrl;

app/code/Magento/AdminNotification/Model/Inbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function getSeverities($severity = null)
5555
MessageInterface::SEVERITY_NOTICE => __('notice'),
5656
];
5757

58-
if (!is_null($severity)) {
58+
if ($severity !== null) {
5959
if (isset($severities[$severity])) {
6060
return $severities[$severity];
6161
}

app/code/Magento/Authorization/Model/CompositeUserContext.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ public function getUserType()
7272
*/
7373
protected function getUserContext()
7474
{
75-
if (is_null($this->chosenUserContext)) {
75+
if ($this->chosenUserContext === null) {
7676
/** @var UserContextInterface $userContext */
7777
foreach ($this->userContexts as $userContext) {
78-
if ($userContext->getUserType() && !is_null($userContext->getUserId())) {
78+
if ($userContext->getUserType() && $userContext->getUserId() !== null) {
7979
$this->chosenUserContext = $userContext;
8080
break;
8181
}
8282
}
83-
if (is_null($this->chosenUserContext)) {
83+
if ($this->chosenUserContext === null) {
8484
$this->chosenUserContext = false;
8585
}
8686
}

app/code/Magento/Authorization/Test/Unit/Model/CompositeUserContextTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ protected function createUserContextMock($userId = null, $userType = null)
161161
{
162162
$useContextMock = $this->getMockBuilder('Magento\Authorization\Model\CompositeUserContext')
163163
->disableOriginalConstructor()->setMethods(['getUserId', 'getUserType'])->getMock();
164-
if (!is_null($userId) && !is_null($userType)) {
164+
if ($userId !== null && $userType !== null) {
165165
$useContextMock->expects($this->any())->method('getUserId')->will($this->returnValue($userId));
166166
$useContextMock->expects($this->any())->method('getUserType')->will($this->returnValue($userType));
167167
}

app/code/Magento/Backend/App/AbstractAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ protected function _processLocaleSettings()
289289
$this->_getSession()->setSessionLocale($forceLocale);
290290
}
291291

292-
if (is_null($this->_getSession()->getLocale())) {
292+
if ($this->_getSession()->getLocale() === null) {
293293
$this->_getSession()->setLocale($this->_localeResolver->getLocale());
294294
}
295295

app/code/Magento/Backend/Block/Dashboard/Bar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function setCurrency($currency)
8484
*/
8585
public function getCurrency()
8686
{
87-
if (is_null($this->_currentCurrencyCode)) {
87+
if ($this->_currentCurrencyCode === null) {
8888
if ($this->getRequest()->getParam('store')) {
8989
$this->_currentCurrencyCode = $this->_storeManager->getStore(
9090
$this->getRequest()->getParam('store')

app/code/Magento/Backend/Block/Dashboard/Graph.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ public function setDataHelper(\Magento\Backend\Helper\Dashboard\AbstractDashboar
545545
*/
546546
protected function _prepareData()
547547
{
548-
if (!is_null($this->_dataHelper)) {
548+
if ($this->_dataHelper !== null) {
549549
$availablePeriods = array_keys($this->_dashboardData->getDatePeriods());
550550
$period = $this->getRequest()->getParam('period');
551551
$this->getDataHelper()->setParam(

app/code/Magento/Backend/Block/Store/Switcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function getWebsiteCollection()
139139
$collection = $this->_websiteFactory->create()->getResourceCollection();
140140

141141
$websiteIds = $this->getWebsiteIds();
142-
if (!is_null($websiteIds)) {
142+
if ($websiteIds !== null) {
143143
$collection->addIdFilter($this->getWebsiteIds());
144144
}
145145

app/code/Magento/Backend/Block/Widget/Grid/Column.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ protected function _getRendererByType()
405405
*/
406406
public function getRenderer()
407407
{
408-
if (is_null($this->_renderer)) {
408+
if ($this->_renderer === null) {
409409
$rendererClass = $this->getData('renderer');
410410
if (empty($rendererClass)) {
411411
$rendererClass = $this->_getRendererByType();
@@ -460,9 +460,9 @@ protected function _getFilterByType()
460460
*/
461461
public function getFilter()
462462
{
463-
if (is_null($this->_filter)) {
463+
if ($this->_filter === null) {
464464
$filterClass = $this->getData('filter');
465-
if (false === (bool)$filterClass && false === is_null($filterClass)) {
465+
if (false === (bool)$filterClass && false === ($filterClass === null)) {
466466
return false;
467467
}
468468
if (!$filterClass) {

app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function getHtml()
103103
*/
104104
public function getDisplayCurrencySelect()
105105
{
106-
if (!is_null($this->getColumn()->getData('display_currency_select'))) {
106+
if ($this->getColumn()->getData('display_currency_select') !== null) {
107107
return $this->getColumn()->getData('display_currency_select');
108108
} else {
109109
return true;
@@ -117,7 +117,7 @@ public function getDisplayCurrencySelect()
117117
*/
118118
public function getCurrencyAffect()
119119
{
120-
if (!is_null($this->getColumn()->getData('currency_affect'))) {
120+
if ($this->getColumn()->getData('currency_affect') !== null) {
121121
return $this->getColumn()->getData('currency_affect');
122122
} else {
123123
return true;
@@ -153,7 +153,7 @@ protected function _getCurrencySelectHtml()
153153
*/
154154
protected function _getCurrencyList()
155155
{
156-
if (is_null($this->_currencyList)) {
156+
if ($this->_currencyList === null) {
157157
$this->_currencyList = $this->_currencyModel->getConfigAllowCurrencies();
158158
}
159159
return $this->_currencyList;

0 commit comments

Comments
 (0)