diff --git a/vendor/magento/module-reports/Model/ResourceModel/Report/Collection/AbstractCollection.php b/vendor/magento/module-reports/Model/ResourceModel/Report/Collection/AbstractCollection.php index 3c78b22c84b..792c81372c0 100644 --- a/vendor/magento/module-reports/Model/ResourceModel/Report/Collection/AbstractCollection.php +++ b/vendor/magento/module-reports/Model/ResourceModel/Report/Collection/AbstractCollection.php @@ -28,7 +28,7 @@ class AbstractCollection extends \Magento\Framework\Model\ResourceModel\Db\Colle protected $_to = null; /** - * Period + * Period to be set as null * * @var string */ @@ -42,21 +42,21 @@ class AbstractCollection extends \Magento\Framework\Model\ResourceModel\Db\Colle protected $_storesIds = 0; /** - * Is totals + * Is totals to be set as false * * @var bool */ protected $_isTotals = false; /** - * Is subtotals + * Is subtotals to be set as false * * @var bool */ protected $_isSubTotals = false; /** - * Aggregated columns + * Aggregated columns to be assigned as an array * * @var array */ @@ -64,6 +64,7 @@ class AbstractCollection extends \Magento\Framework\Model\ResourceModel\Db\Colle /** * Set array of columns that should be aggregated + * * @codeCoverageIgnore * * @param array $columns @@ -77,6 +78,7 @@ class AbstractCollection extends \Magento\Framework\Model\ResourceModel\Db\Colle /** * Retrieve array of columns that should be aggregated + * * @codeCoverageIgnore * * @return array @@ -88,6 +90,7 @@ class AbstractCollection extends \Magento\Framework\Model\ResourceModel\Db\Colle /** * Set date range + * * @codeCoverageIgnore * * @param mixed $from @@ -103,6 +106,7 @@ class AbstractCollection extends \Magento\Framework\Model\ResourceModel\Db\Colle /** * Set period + * * @codeCoverageIgnore * * @param string $period @@ -150,7 +154,10 @@ class AbstractCollection extends \Magento\Framework\Model\ResourceModel\Db\Colle */ public function addStoreFilter($storeIds) { - $this->_storesIds = $storeIds; + //if (!is_array($this->_storesIds) && $this->_storesIds === 0) { + $this->_storesIds = $storeIds; + //} + return $this; } @@ -171,7 +178,8 @@ class AbstractCollection extends \Magento\Framework\Model\ResourceModel\Db\Colle $storeIds = array_unique($storeIds); - if ($index = array_search(null, $storeIds)) { + $index = array_search(null, $storeIds); + if ($index !== false) { unset($storeIds[$index]); $nullCheck = true; } @@ -222,6 +230,7 @@ class AbstractCollection extends \Magento\Framework\Model\ResourceModel\Db\Colle /** * Setter for isSubTotals + * * @codeCoverageIgnore * * @param bool $flag @@ -244,6 +253,8 @@ class AbstractCollection extends \Magento\Framework\Model\ResourceModel\Db\Colle } /** + * Init select to return the current class + * * @return $this */ protected function _initSelect()