Skip to content

Commit bb31a78

Browse files
committed
Replaced is_null with null ===
1 parent bd34d4b commit bb31a78

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

Block/Post/View/RelatedProducts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function displayProducts()
104104
*/
105105
public function getItems()
106106
{
107-
if (is_null($this->_itemCollection)) {
107+
if (null === $this->_itemCollection) {
108108
$this->_prepareCollection();
109109
}
110110
return $this->_itemCollection;

Block/Sidebar/Archive.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function _preparePostCollection()
4646
*/
4747
public function getMonths()
4848
{
49-
if (is_null($this->_months)) {
49+
if (null === $this->_months) {
5050
$this->_months = [];
5151
$this->_preparePostCollection();
5252
foreach ($this->_postCollection as $post) {

Model/AdminNotificationFeed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function __construct(
7676
*/
7777
public function getFeedUrl()
7878
{
79-
if (is_null($this->_feedUrl)) {
79+
if (null === $this->_feedUrl) {
8080
$this->_feedUrl = 'https://mage'.'fan'
8181
.'.c'.'om/community/notifications'.'/'.'feed/';
8282
}

Model/Comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public function getParentComment()
238238
*/
239239
public function getChildComments()
240240
{
241-
if (is_null($this->comments)) {
241+
if (null === $this->comments) {
242242
$this->comments = $this->commentCollectionFactory->create()
243243
->addFieldToFilter('parent_id', $this->getId());
244244
}

Model/Post.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ public function getOgImage()
625625
*/
626626
public function getParentCategories()
627627
{
628-
if (is_null($this->_parentCategories)) {
628+
if (null === $this->_parentCategories) {
629629
$this->_parentCategories = $this->_categoryCollectionFactory->create()
630630
->addFieldToFilter('category_id', ['in' => $this->getCategories()])
631631
->addStoreFilter($this->getStoreId())
@@ -671,7 +671,7 @@ public function getCategoriesCount()
671671
*/
672672
public function getRelatedTags()
673673
{
674-
if (is_null($this->_relatedTags)) {
674+
if (null === $this->_relatedTags) {
675675
$this->_relatedTags = $this->_tagCollectionFactory->create()
676676
->addFieldToFilter('tag_id', ['in' => $this->getTags()])
677677
->addActiveFilter()

Model/ResourceModel/Category.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ protected function _afterSave(\Magento\Framework\Model\AbstractModel $object)
141141
*/
142142
public function load(\Magento\Framework\Model\AbstractModel $object, $value, $field = null)
143143
{
144-
if (!is_numeric($value) && is_null($field)) {
144+
if (!is_numeric($value) && null === $field) {
145145
$field = 'identifier';
146146
}
147147

Model/ResourceModel/Post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ protected function _updateLinks(
274274
*/
275275
public function load(\Magento\Framework\Model\AbstractModel $object, $value, $field = null)
276276
{
277-
if (!is_numeric($value) && is_null($field)) {
277+
if (!is_numeric($value) && null === $field) {
278278
$field = 'identifier';
279279
}
280280

Model/ResourceModel/Tag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object)
9393
*/
9494
public function load(\Magento\Framework\Model\AbstractModel $object, $value, $field = null)
9595
{
96-
if (!is_numeric($value) && is_null($field)) {
96+
if (!is_numeric($value) && null === $field) {
9797
$field = 'identifier';
9898
}
9999

0 commit comments

Comments
 (0)