Skip to content

Commit b9ba0d9

Browse files
committed
change null comparation position
1 parent 7649543 commit b9ba0d9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Controller/Adminhtml/Actions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,11 @@ protected function _massStatusAction()
439439
$status = $this->getRequest()->getParam('status');
440440
$statusFieldName = $this->_statusField;
441441

442-
if ($status === null) {
442+
if (null === $status) {
443443
throw new Exception(__('Parameter "Status" missing in request data.'));
444444
}
445445

446-
if ($statusFieldName === null) {
446+
if (null === $statusFieldName) {
447447
throw new Exception(__('Status Field Name is not specified.'));
448448
}
449449

@@ -529,7 +529,7 @@ protected function filterParams($data)
529529
*/
530530
protected function _getRegistry()
531531
{
532-
if ($this->_coreRegistry === null) {
532+
if (null === $this->_coreRegistry) {
533533
$this->_coreRegistry = $this->_objectManager->get(Registry::class);
534534
}
535535
return $this->_coreRegistry;
@@ -554,7 +554,7 @@ protected function _isAllowed()
554554
*/
555555
protected function _getModel($load = true)
556556
{
557-
if ($this->_model === null) {
557+
if (null === $this->_model) {
558558
$this->_model = $this->_objectManager->create($this->_modelClass);
559559

560560
$id = (int)$this->getRequest()->getParam($this->_idKey);

Model/AdminNotificationFeed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ protected function _construct()
153153
*/
154154
public function getFeedUrl()
155155
{
156-
if ($this->_feedUrl === null) {
156+
if (null === $this->_feedUrl) {
157157
$this->_feedUrl = 'https://mage'.'fan'
158158
.'.c'.'om/community/notifications'.'/'.'feed/';
159159
}

Model/GetWebsitesMap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ public function __construct(
4141
*/
4242
public function execute(): array
4343
{
44-
if ($this->websitesMap === null) {
44+
if (null === $this->websitesMap) {
4545
$this->websitesMap = [];
4646
$websites = $this->storeManager->getWebsites();
4747
foreach ($websites as $website) {
4848
// Continue if website has no store to be able to create catalog rule for website without store
49-
if ($website->getDefaultStore() === null) {
49+
if (null === $website->getDefaultStore()) {
5050
continue;
5151
}
5252
$this->websitesMap[$website->getId()] = $website->getDefaultStore()->getId();

0 commit comments

Comments
 (0)