Remove mention of $count in Factory Sequence documentation #10816
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following description of
$countin aSequencecallback:is incorrect.
$countis equal to the number of parameters passed to the constructor.$countis not useful forSequences with a callback passed to the constructor, as, if there is only one callback passed,$countwill always be1. If two callbacks were passed to the constructor, it would be2, and so on.In tinker:
The primary use for
$countis one internal to the Sequence class logic, when multiple arguments are passed to the sequence constructor and the count is used to modulo the index to avoid accessing values beyond the size of the arguments array. It's hard to imagine scenarios where this value would be particularly useful as a public property, but concealing it from the documentation will at least help people avoid using it mistakenly.I also updated the code snippet to use the syntax
->state(new Sequence(rather than->sequence(, as that latter concept is first introduced in the lines below this snippet.