Lines Matching refs:howMany
141 * Returns a promise that will resolve when `$howMany` of the supplied items in
143 * will be an array of length `$howMany` containing the resolution values of the
146 * The returned promise will reject if it becomes impossible for `$howMany` items
147 * to resolve (that is, when `(count($promisesOrValues) - $howMany) + 1` items
149 * `(count($promisesOrValues) - $howMany) + 1` rejection reasons.
152 * if `$promisesOrValues` contains less items than `$howMany`.
155 * @param int $howMany
158 function some($promisesOrValues, $howMany)
163 return new Promise(function ($resolve, $reject, $notify) use ($promisesOrValues, $howMany, $cancellationQueue) {
165 ->done(function ($array) use ($howMany, $cancellationQueue, $resolve, $reject, $notify) {
166 if (!\is_array($array) || $howMany < 1) {
173 if ($len < $howMany) {
177 $howMany,
178 1 === $howMany ? '' : 's',
185 $toResolve = $howMany;