Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,13 @@ class Storage
protected $_byPagesIterator;

/**
* @var CustomerCollectionFactory
*/
private $customerCollectionFactory;

/**
* @param CustomerCollectionFactory $collectionFactory
* @param CollectionByPagesIteratorFactory $colIteratorFactory
* @param array $data
*/
public function __construct(
CustomerCollectionFactory $collectionFactory,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we still need this variable passed in as it get's used on $this->customerCollectionFactory = $collectionFactory; so we should keep that as well as private $customerCollectionFactory; but we can keep the removal of:

        $this->_customerCollection = isset(
            $data['customer_collection']
        ) ? $data['customer_collection'] : $collectionFactory->create();

CollectionByPagesIteratorFactory $colIteratorFactory,
array $data = []
) {
$this->_customerCollection = isset(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not allowed to remove public properties, because according to PHP Property Visibility: Methods declared without any explicit visibility keyword are defined as public.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @maxalmonte14 would you be able to add the $_customerCollection as public then in future versions we can deprecate it. But it would be better at least to have it shown and public now. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, now the $_customerCollection property is public.

$data['customer_collection']
) ? $data['customer_collection'] : $collectionFactory->create();
$this->_pageSize = isset($data['page_size']) ? $data['page_size'] : 0;
$this->_byPagesIterator = isset(
$data['collection_by_pages_iterator']
Expand Down