-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use count value of request #19
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Better clarity on added docs is possible.
- Do you see a way to provoke the number of items and the count value to be different in a unit test?
src/FINDOLOGIC/Export/Exporter.php
Outdated
@@ -63,10 +63,11 @@ protected function __construct($itemsPerPage) | |||
* @param array $items Array of items to serialize. All of them are serialized, regardless of $start and $total. | |||
* @param int $start Assuming that $items is a fragment of the total, this is the global index of the first item in | |||
* $items. | |||
* @param int $count The number of items processed per export step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the peculiar meaning of this value we discussed, the documentation should mention that this is the number of expected items, and does not necessarily have to match the actual number in case of problems for individual items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible text: The number of items requested for this export step. Actual number of items can be smaller due to errors, and can not be greater than the requested count, because that would indicate that the requested count is ignored when generating items.
src/FINDOLOGIC/Export/Exporter.php
Outdated
@@ -76,10 +77,11 @@ protected function __construct($itemsPerPage) | |||
* @param array $items Array of items to serialize. All of them are serialized, regardless of $start and $total. | |||
* @param int $start Assuming that $items is a fragment of the total, this is the global index of the first item in | |||
* $items. | |||
* @param int $count The number of items processed per export step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the peculiar meaning of this value we discussed, the documentation should mention that this is the number of expected items, and does not necessarily have to match the actual number in case of problems for individual items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible text: The number of items requested for this export step. Actual number of items can be smaller due to errors, and can not be greater than the requested count, because that would indicate that the requested count is ignored when generating items.
This will resolve #18
@howad Should we add a exception if the number if items exceeds the count value?