name: Enumerable class_comment: null dependencies: - name: CachingIterator type: class source: CachingIterator - name: Countable type: class source: Countable - name: Arrayable type: class source: Illuminate\Contracts\Support\Arrayable - name: Jsonable type: class source: Illuminate\Contracts\Support\Jsonable - name: IteratorAggregate type: class source: IteratorAggregate - name: JsonSerializable type: class source: JsonSerializable - name: Traversable type: class source: Traversable properties: [] methods: - name: make visibility: public parameters: - name: items default: '[]' comment: '# * @template TKey of array-key # * # * @template-covariant TValue # * # * @extends \Illuminate\Contracts\Support\Arrayable # * @extends \IteratorAggregate # */ # interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, JsonSerializable # { # /** # * Create a new collection instance if the value isn''t one already. # * # * @template TMakeKey of array-key # * @template TMakeValue # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable|null $items # * @return static' - name: times visibility: public parameters: - name: number - name: callback default: 'null' comment: '# * Create a new instance by invoking the callback a given amount of times. # * # * @param int $number # * @param callable|null $callback # * @return static' - name: range visibility: public parameters: - name: from - name: to comment: '# * Create a collection with the given range. # * # * @param int $from # * @param int $to # * @return static' - name: wrap visibility: public parameters: - name: value comment: '# * Wrap the given value in a collection if applicable. # * # * @template TWrapValue # * # * @param iterable|TWrapValue $value # * @return static' - name: unwrap visibility: public parameters: - name: value comment: '# * Get the underlying items from the given collection if applicable. # * # * @template TUnwrapKey of array-key # * @template TUnwrapValue # * # * @param array|static $value # * @return array' - name: empty visibility: public parameters: [] comment: '# * Create a new instance with no items. # * # * @return static' - name: all visibility: public parameters: [] comment: '# * Get all items in the enumerable. # * # * @return array' - name: average visibility: public parameters: - name: callback default: 'null' comment: '# * Alias for the "avg" method. # * # * @param (callable(TValue): float|int)|string|null $callback # * @return float|int|null' - name: median visibility: public parameters: - name: key default: 'null' comment: '# * Get the median of a given key. # * # * @param string|array|null $key # * @return float|int|null' - name: mode visibility: public parameters: - name: key default: 'null' comment: '# * Get the mode of a given key. # * # * @param string|array|null $key # * @return array|null' - name: collapse visibility: public parameters: [] comment: '# * Collapse the items into a single enumerable. # * # * @return static' - name: some visibility: public parameters: - name: key - name: operator default: 'null' - name: value default: 'null' comment: '# * Alias for the "contains" method. # * # * @param (callable(TValue, TKey): bool)|TValue|string $key # * @param mixed $operator # * @param mixed $value # * @return bool' - name: containsStrict visibility: public parameters: - name: key - name: value default: 'null' comment: '# * Determine if an item exists, using strict comparison. # * # * @param (callable(TValue): bool)|TValue|array-key $key # * @param TValue|null $value # * @return bool' - name: avg visibility: public parameters: - name: callback default: 'null' comment: '# * Get the average value of a given key. # * # * @param (callable(TValue): float|int)|string|null $callback # * @return float|int|null' - name: contains visibility: public parameters: - name: key - name: operator default: 'null' - name: value default: 'null' comment: '# * Determine if an item exists in the enumerable. # * # * @param (callable(TValue, TKey): bool)|TValue|string $key # * @param mixed $operator # * @param mixed $value # * @return bool' - name: doesntContain visibility: public parameters: - name: key - name: operator default: 'null' - name: value default: 'null' comment: '# * Determine if an item is not contained in the collection. # * # * @param mixed $key # * @param mixed $operator # * @param mixed $value # * @return bool' - name: crossJoin visibility: public parameters: - name: '...$lists' comment: '# * Cross join with the given lists, returning all possible permutations. # * # * @template TCrossJoinKey # * @template TCrossJoinValue # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable ...$lists # * @return static>' - name: dd visibility: public parameters: - name: '...$args' comment: '# * Dump the collection and end the script. # * # * @param mixed ...$args # * @return never' - name: dump visibility: public parameters: - name: '...$args' comment: '# * Dump the collection. # * # * @param mixed ...$args # * @return $this' - name: diff visibility: public parameters: - name: items comment: '# * Get the items that are not present in the given items. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @return static' - name: diffUsing visibility: public parameters: - name: items - name: callback comment: '# * Get the items that are not present in the given items, using the callback. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @param callable(TValue, TValue): int $callback # * @return static' - name: diffAssoc visibility: public parameters: - name: items comment: '# * Get the items whose keys and values are not present in the given items. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @return static' - name: diffAssocUsing visibility: public parameters: - name: items - name: callback comment: '# * Get the items whose keys and values are not present in the given items, using the callback. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @param callable(TKey, TKey): int $callback # * @return static' - name: diffKeys visibility: public parameters: - name: items comment: '# * Get the items whose keys are not present in the given items. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @return static' - name: diffKeysUsing visibility: public parameters: - name: items - name: callback comment: '# * Get the items whose keys are not present in the given items, using the callback. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @param callable(TKey, TKey): int $callback # * @return static' - name: duplicates visibility: public parameters: - name: callback default: 'null' - name: strict default: 'false' comment: '# * Retrieve duplicate items. # * # * @param (callable(TValue): bool)|string|null $callback # * @param bool $strict # * @return static' - name: duplicatesStrict visibility: public parameters: - name: callback default: 'null' comment: '# * Retrieve duplicate items using strict comparison. # * # * @param (callable(TValue): bool)|string|null $callback # * @return static' - name: each visibility: public parameters: - name: callback comment: '# * Execute a callback over each item. # * # * @param callable(TValue, TKey): mixed $callback # * @return $this' - name: eachSpread visibility: public parameters: - name: callback comment: '# * Execute a callback over each nested chunk of items. # * # * @param callable $callback # * @return static' - name: every visibility: public parameters: - name: key - name: operator default: 'null' - name: value default: 'null' comment: '# * Determine if all items pass the given truth test. # * # * @param (callable(TValue, TKey): bool)|TValue|string $key # * @param mixed $operator # * @param mixed $value # * @return bool' - name: except visibility: public parameters: - name: keys comment: '# * Get all items except for those with the specified keys. # * # * @param \Illuminate\Support\Enumerable|array $keys # * @return static' - name: filter visibility: public parameters: - name: callback default: 'null' comment: '# * Run a filter over each of the items. # * # * @param (callable(TValue): bool)|null $callback # * @return static' - name: when visibility: public parameters: - name: value - name: callback default: 'null' - name: default default: 'null' comment: '# * Apply the callback if the given "value" is (or resolves to) truthy. # * # * @template TWhenReturnType as null # * # * @param bool $value # * @param (callable($this): TWhenReturnType)|null $callback # * @param (callable($this): TWhenReturnType)|null $default # * @return $this|TWhenReturnType' - name: whenEmpty visibility: public parameters: - name: callback - name: default default: 'null' comment: '# * Apply the callback if the collection is empty. # * # * @template TWhenEmptyReturnType # * # * @param (callable($this): TWhenEmptyReturnType) $callback # * @param (callable($this): TWhenEmptyReturnType)|null $default # * @return $this|TWhenEmptyReturnType' - name: whenNotEmpty visibility: public parameters: - name: callback - name: default default: 'null' comment: '# * Apply the callback if the collection is not empty. # * # * @template TWhenNotEmptyReturnType # * # * @param callable($this): TWhenNotEmptyReturnType $callback # * @param (callable($this): TWhenNotEmptyReturnType)|null $default # * @return $this|TWhenNotEmptyReturnType' - name: unless visibility: public parameters: - name: value - name: callback - name: default default: 'null' comment: '# * Apply the callback if the given "value" is (or resolves to) truthy. # * # * @template TUnlessReturnType # * # * @param bool $value # * @param (callable($this): TUnlessReturnType) $callback # * @param (callable($this): TUnlessReturnType)|null $default # * @return $this|TUnlessReturnType' - name: unlessEmpty visibility: public parameters: - name: callback - name: default default: 'null' comment: '# * Apply the callback unless the collection is empty. # * # * @template TUnlessEmptyReturnType # * # * @param callable($this): TUnlessEmptyReturnType $callback # * @param (callable($this): TUnlessEmptyReturnType)|null $default # * @return $this|TUnlessEmptyReturnType' - name: unlessNotEmpty visibility: public parameters: - name: callback - name: default default: 'null' comment: '# * Apply the callback unless the collection is not empty. # * # * @template TUnlessNotEmptyReturnType # * # * @param callable($this): TUnlessNotEmptyReturnType $callback # * @param (callable($this): TUnlessNotEmptyReturnType)|null $default # * @return $this|TUnlessNotEmptyReturnType' - name: where visibility: public parameters: - name: key - name: operator default: 'null' - name: value default: 'null' comment: '# * Filter items by the given key value pair. # * # * @param string $key # * @param mixed $operator # * @param mixed $value # * @return static' - name: whereNull visibility: public parameters: - name: key default: 'null' comment: '# * Filter items where the value for the given key is null. # * # * @param string|null $key # * @return static' - name: whereNotNull visibility: public parameters: - name: key default: 'null' comment: '# * Filter items where the value for the given key is not null. # * # * @param string|null $key # * @return static' - name: whereStrict visibility: public parameters: - name: key - name: value comment: '# * Filter items by the given key value pair using strict comparison. # * # * @param string $key # * @param mixed $value # * @return static' - name: whereIn visibility: public parameters: - name: key - name: values - name: strict default: 'false' comment: '# * Filter items by the given key value pair. # * # * @param string $key # * @param \Illuminate\Contracts\Support\Arrayable|iterable $values # * @param bool $strict # * @return static' - name: whereInStrict visibility: public parameters: - name: key - name: values comment: '# * Filter items by the given key value pair using strict comparison. # * # * @param string $key # * @param \Illuminate\Contracts\Support\Arrayable|iterable $values # * @return static' - name: whereBetween visibility: public parameters: - name: key - name: values comment: '# * Filter items such that the value of the given key is between the given values. # * # * @param string $key # * @param \Illuminate\Contracts\Support\Arrayable|iterable $values # * @return static' - name: whereNotBetween visibility: public parameters: - name: key - name: values comment: '# * Filter items such that the value of the given key is not between the given values. # * # * @param string $key # * @param \Illuminate\Contracts\Support\Arrayable|iterable $values # * @return static' - name: whereNotIn visibility: public parameters: - name: key - name: values - name: strict default: 'false' comment: '# * Filter items by the given key value pair. # * # * @param string $key # * @param \Illuminate\Contracts\Support\Arrayable|iterable $values # * @param bool $strict # * @return static' - name: whereNotInStrict visibility: public parameters: - name: key - name: values comment: '# * Filter items by the given key value pair using strict comparison. # * # * @param string $key # * @param \Illuminate\Contracts\Support\Arrayable|iterable $values # * @return static' - name: whereInstanceOf visibility: public parameters: - name: type comment: '# * Filter the items, removing any items that don''t match the given type(s). # * # * @template TWhereInstanceOf # * # * @param class-string|array> $type # * @return static' - name: first visibility: public parameters: - name: callback default: 'null' - name: default default: 'null' comment: '# * Get the first item from the enumerable passing the given truth test. # * # * @template TFirstDefault # * # * @param (callable(TValue,TKey): bool)|null $callback # * @param TFirstDefault|(\Closure(): TFirstDefault) $default # * @return TValue|TFirstDefault' - name: firstWhere visibility: public parameters: - name: key - name: operator default: 'null' - name: value default: 'null' comment: '# * Get the first item by the given key value pair. # * # * @param string $key # * @param mixed $operator # * @param mixed $value # * @return TValue|null' - name: flatten visibility: public parameters: - name: depth default: INF comment: '# * Get a flattened array of the items in the collection. # * # * @param int $depth # * @return static' - name: flip visibility: public parameters: [] comment: '# * Flip the values with their keys. # * # * @return static' - name: get visibility: public parameters: - name: key - name: default default: 'null' comment: '# * Get an item from the collection by key. # * # * @template TGetDefault # * # * @param TKey $key # * @param TGetDefault|(\Closure(): TGetDefault) $default # * @return TValue|TGetDefault' - name: groupBy visibility: public parameters: - name: groupBy - name: preserveKeys default: 'false' comment: '# * Group an associative array by a field or using a callback. # * # * @param (callable(TValue, TKey): array-key)|array|string $groupBy # * @param bool $preserveKeys # * @return static>' - name: keyBy visibility: public parameters: - name: keyBy comment: '# * Key an associative array by a field or using a callback. # * # * @param (callable(TValue, TKey): array-key)|array|string $keyBy # * @return static' - name: has visibility: public parameters: - name: key comment: '# * Determine if an item exists in the collection by key. # * # * @param TKey|array $key # * @return bool' - name: hasAny visibility: public parameters: - name: key comment: '# * Determine if any of the keys exist in the collection. # * # * @param mixed $key # * @return bool' - name: implode visibility: public parameters: - name: value - name: glue default: 'null' comment: '# * Concatenate values of a given key as a string. # * # * @param callable|string $value # * @param string|null $glue # * @return string' - name: intersect visibility: public parameters: - name: items comment: '# * Intersect the collection with the given items. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @return static' - name: intersectUsing visibility: public parameters: - name: items - name: callback comment: '# * Intersect the collection with the given items, using the callback. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @param callable(TValue, TValue): int $callback # * @return static' - name: intersectAssoc visibility: public parameters: - name: items comment: '# * Intersect the collection with the given items with additional index check. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @return static' - name: intersectAssocUsing visibility: public parameters: - name: items - name: callback comment: '# * Intersect the collection with the given items with additional index check, using the callback. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @param callable(TValue, TValue): int $callback # * @return static' - name: intersectByKeys visibility: public parameters: - name: items comment: '# * Intersect the collection with the given items by key. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @return static' - name: isEmpty visibility: public parameters: [] comment: '# * Determine if the collection is empty or not. # * # * @return bool' - name: isNotEmpty visibility: public parameters: [] comment: '# * Determine if the collection is not empty. # * # * @return bool' - name: containsOneItem visibility: public parameters: [] comment: '# * Determine if the collection contains a single item. # * # * @return bool' - name: join visibility: public parameters: - name: glue - name: finalGlue default: '''''' comment: '# * Join all items from the collection using a string. The final items can use a separate glue string. # * # * @param string $glue # * @param string $finalGlue # * @return string' - name: keys visibility: public parameters: [] comment: '# * Get the keys of the collection items. # * # * @return static' - name: last visibility: public parameters: - name: callback default: 'null' - name: default default: 'null' comment: '# * Get the last item from the collection. # * # * @template TLastDefault # * # * @param (callable(TValue, TKey): bool)|null $callback # * @param TLastDefault|(\Closure(): TLastDefault) $default # * @return TValue|TLastDefault' - name: map visibility: public parameters: - name: callback comment: '# * Run a map over each of the items. # * # * @template TMapValue # * # * @param callable(TValue, TKey): TMapValue $callback # * @return static' - name: mapSpread visibility: public parameters: - name: callback comment: '# * Run a map over each nested chunk of items. # * # * @param callable $callback # * @return static' - name: mapToDictionary visibility: public parameters: - name: callback comment: '# * Run a dictionary map over the items. # * # * The callback should return an associative array with a single key/value pair. # * # * @template TMapToDictionaryKey of array-key # * @template TMapToDictionaryValue # * # * @param callable(TValue, TKey): array $callback # * @return static>' - name: mapToGroups visibility: public parameters: - name: callback comment: '# * Run a grouping map over the items. # * # * The callback should return an associative array with a single key/value pair. # * # * @template TMapToGroupsKey of array-key # * @template TMapToGroupsValue # * # * @param callable(TValue, TKey): array $callback # * @return static>' - name: mapWithKeys visibility: public parameters: - name: callback comment: '# * Run an associative map over each of the items. # * # * The callback should return an associative array with a single key/value pair. # * # * @template TMapWithKeysKey of array-key # * @template TMapWithKeysValue # * # * @param callable(TValue, TKey): array $callback # * @return static' - name: flatMap visibility: public parameters: - name: callback comment: '# * Map a collection and flatten the result by a single level. # * # * @template TFlatMapKey of array-key # * @template TFlatMapValue # * # * @param callable(TValue, TKey): (\Illuminate\Support\Collection|array) $callback # * @return static' - name: mapInto visibility: public parameters: - name: class comment: '# * Map the values into a new class. # * # * @template TMapIntoValue # * # * @param class-string $class # * @return static' - name: merge visibility: public parameters: - name: items comment: '# * Merge the collection with the given items. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @return static' - name: mergeRecursive visibility: public parameters: - name: items comment: '# * Recursively merge the collection with the given items. # * # * @template TMergeRecursiveValue # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @return static' - name: combine visibility: public parameters: - name: values comment: '# * Create a collection by using this collection for keys and another for its values. # * # * @template TCombineValue # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $values # * @return static' - name: union visibility: public parameters: - name: items comment: '# * Union the collection with the given items. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @return static' - name: min visibility: public parameters: - name: callback default: 'null' comment: '# * Get the min value of a given key. # * # * @param (callable(TValue):mixed)|string|null $callback # * @return mixed' - name: max visibility: public parameters: - name: callback default: 'null' comment: '# * Get the max value of a given key. # * # * @param (callable(TValue):mixed)|string|null $callback # * @return mixed' - name: nth visibility: public parameters: - name: step - name: offset default: '0' comment: '# * Create a new collection consisting of every n-th element. # * # * @param int $step # * @param int $offset # * @return static' - name: only visibility: public parameters: - name: keys comment: '# * Get the items with the specified keys. # * # * @param \Illuminate\Support\Enumerable|array|string $keys # * @return static' - name: forPage visibility: public parameters: - name: page - name: perPage comment: '# * "Paginate" the collection by slicing it into a smaller collection. # * # * @param int $page # * @param int $perPage # * @return static' - name: partition visibility: public parameters: - name: key - name: operator default: 'null' - name: value default: 'null' comment: '# * Partition the collection into two arrays using the given callback or key. # * # * @param (callable(TValue, TKey): bool)|TValue|string $key # * @param mixed $operator # * @param mixed $value # * @return static, static>' - name: concat visibility: public parameters: - name: source comment: '# * Push all of the given items onto the collection. # * # * @template TConcatKey of array-key # * @template TConcatValue # * # * @param iterable $source # * @return static' - name: random visibility: public parameters: - name: number default: 'null' comment: '# * Get one or a specified number of items randomly from the collection. # * # * @param int|null $number # * @return static|TValue # * # * @throws \InvalidArgumentException' - name: reduce visibility: public parameters: - name: callback - name: initial default: 'null' comment: '# * Reduce the collection to a single value. # * # * @template TReduceInitial # * @template TReduceReturnType # * # * @param callable(TReduceInitial|TReduceReturnType, TValue, TKey): TReduceReturnType $callback # * @param TReduceInitial $initial # * @return TReduceReturnType' - name: reduceSpread visibility: public parameters: - name: callback - name: '...$initial' comment: '# * Reduce the collection to multiple aggregate values. # * # * @param callable $callback # * @param mixed ...$initial # * @return array # * # * @throws \UnexpectedValueException' - name: replace visibility: public parameters: - name: items comment: '# * Replace the collection items with the given items. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @return static' - name: replaceRecursive visibility: public parameters: - name: items comment: '# * Recursively replace the collection items with the given items. # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable $items # * @return static' - name: reverse visibility: public parameters: [] comment: '# * Reverse items order. # * # * @return static' - name: search visibility: public parameters: - name: value - name: strict default: 'false' comment: '# * Search the collection for a given value and return the corresponding key if successful. # * # * @param TValue|callable(TValue,TKey): bool $value # * @param bool $strict # * @return TKey|bool' - name: before visibility: public parameters: - name: value - name: strict default: 'false' comment: '# * Get the item before the given item. # * # * @param TValue|(callable(TValue,TKey): bool) $value # * @param bool $strict # * @return TValue|null' - name: after visibility: public parameters: - name: value - name: strict default: 'false' comment: '# * Get the item after the given item. # * # * @param TValue|(callable(TValue,TKey): bool) $value # * @param bool $strict # * @return TValue|null' - name: shuffle visibility: public parameters: [] comment: '# * Shuffle the items in the collection. # * # * @return static' - name: sliding visibility: public parameters: - name: size default: '2' - name: step default: '1' comment: '# * Create chunks representing a "sliding window" view of the items in the collection. # * # * @param int $size # * @param int $step # * @return static' - name: skip visibility: public parameters: - name: count comment: '# * Skip the first {$count} items. # * # * @param int $count # * @return static' - name: skipUntil visibility: public parameters: - name: value comment: '# * Skip items in the collection until the given condition is met. # * # * @param TValue|callable(TValue,TKey): bool $value # * @return static' - name: skipWhile visibility: public parameters: - name: value comment: '# * Skip items in the collection while the given condition is met. # * # * @param TValue|callable(TValue,TKey): bool $value # * @return static' - name: slice visibility: public parameters: - name: offset - name: length default: 'null' comment: '# * Get a slice of items from the enumerable. # * # * @param int $offset # * @param int|null $length # * @return static' - name: split visibility: public parameters: - name: numberOfGroups comment: '# * Split a collection into a certain number of groups. # * # * @param int $numberOfGroups # * @return static' - name: sole visibility: public parameters: - name: key default: 'null' - name: operator default: 'null' - name: value default: 'null' comment: '# * Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception. # * # * @param (callable(TValue, TKey): bool)|string $key # * @param mixed $operator # * @param mixed $value # * @return TValue # * # * @throws \Illuminate\Support\ItemNotFoundException # * @throws \Illuminate\Support\MultipleItemsFoundException' - name: firstOrFail visibility: public parameters: - name: key default: 'null' - name: operator default: 'null' - name: value default: 'null' comment: '# * Get the first item in the collection but throw an exception if no matching items exist. # * # * @param (callable(TValue, TKey): bool)|string $key # * @param mixed $operator # * @param mixed $value # * @return TValue # * # * @throws \Illuminate\Support\ItemNotFoundException' - name: chunk visibility: public parameters: - name: size comment: '# * Chunk the collection into chunks of the given size. # * # * @param int $size # * @return static' - name: chunkWhile visibility: public parameters: - name: callback comment: '# * Chunk the collection into chunks with a callback. # * # * @param callable(TValue, TKey, static): bool $callback # * @return static>' - name: splitIn visibility: public parameters: - name: numberOfGroups comment: '# * Split a collection into a certain number of groups, and fill the first groups completely. # * # * @param int $numberOfGroups # * @return static' - name: sort visibility: public parameters: - name: callback default: 'null' comment: '# * Sort through each item with a callback. # * # * @param (callable(TValue, TValue): int)|null|int $callback # * @return static' - name: sortDesc visibility: public parameters: - name: options default: SORT_REGULAR comment: '# * Sort items in descending order. # * # * @param int $options # * @return static' - name: sortBy visibility: public parameters: - name: callback - name: options default: SORT_REGULAR - name: descending default: 'false' comment: '# * Sort the collection using the given callback. # * # * @param array|(callable(TValue, TKey): mixed)|string $callback # * @param int $options # * @param bool $descending # * @return static' - name: sortByDesc visibility: public parameters: - name: callback - name: options default: SORT_REGULAR comment: '# * Sort the collection in descending order using the given callback. # * # * @param array|(callable(TValue, TKey): mixed)|string $callback # * @param int $options # * @return static' - name: sortKeys visibility: public parameters: - name: options default: SORT_REGULAR - name: descending default: 'false' comment: '# * Sort the collection keys. # * # * @param int $options # * @param bool $descending # * @return static' - name: sortKeysDesc visibility: public parameters: - name: options default: SORT_REGULAR comment: '# * Sort the collection keys in descending order. # * # * @param int $options # * @return static' - name: sortKeysUsing visibility: public parameters: - name: callback comment: '# * Sort the collection keys using a callback. # * # * @param callable(TKey, TKey): int $callback # * @return static' - name: sum visibility: public parameters: - name: callback default: 'null' comment: '# * Get the sum of the given values. # * # * @param (callable(TValue): mixed)|string|null $callback # * @return mixed' - name: take visibility: public parameters: - name: limit comment: '# * Take the first or last {$limit} items. # * # * @param int $limit # * @return static' - name: takeUntil visibility: public parameters: - name: value comment: '# * Take items in the collection until the given condition is met. # * # * @param TValue|callable(TValue,TKey): bool $value # * @return static' - name: takeWhile visibility: public parameters: - name: value comment: '# * Take items in the collection while the given condition is met. # * # * @param TValue|callable(TValue,TKey): bool $value # * @return static' - name: tap visibility: public parameters: - name: callback comment: '# * Pass the collection to the given callback and then return it. # * # * @param callable(TValue): mixed $callback # * @return $this' - name: pipe visibility: public parameters: - name: callback comment: '# * Pass the enumerable to the given callback and return the result. # * # * @template TPipeReturnType # * # * @param callable($this): TPipeReturnType $callback # * @return TPipeReturnType' - name: pipeInto visibility: public parameters: - name: class comment: '# * Pass the collection into a new class. # * # * @template TPipeIntoValue # * # * @param class-string $class # * @return TPipeIntoValue' - name: pipeThrough visibility: public parameters: - name: pipes comment: '# * Pass the collection through a series of callable pipes and return the result. # * # * @param array $pipes # * @return mixed' - name: pluck visibility: public parameters: - name: value - name: key default: 'null' comment: '# * Get the values of a given key. # * # * @param string|array $value # * @param string|null $key # * @return static' - name: reject visibility: public parameters: - name: callback default: 'true' comment: '# * Create a collection of all elements that do not pass a given truth test. # * # * @param (callable(TValue, TKey): bool)|bool|TValue $callback # * @return static' - name: undot visibility: public parameters: [] comment: '# * Convert a flatten "dot" notation array into an expanded array. # * # * @return static' - name: unique visibility: public parameters: - name: key default: 'null' - name: strict default: 'false' comment: '# * Return only unique items from the collection array. # * # * @param (callable(TValue, TKey): mixed)|string|null $key # * @param bool $strict # * @return static' - name: uniqueStrict visibility: public parameters: - name: key default: 'null' comment: '# * Return only unique items from the collection array using strict comparison. # * # * @param (callable(TValue, TKey): mixed)|string|null $key # * @return static' - name: values visibility: public parameters: [] comment: '# * Reset the keys on the underlying array. # * # * @return static' - name: pad visibility: public parameters: - name: size - name: value comment: '# * Pad collection to the specified length with a value. # * # * @template TPadValue # * # * @param int $size # * @param TPadValue $value # * @return static' - name: getIterator visibility: public parameters: [] comment: '# * Get the values iterator. # * # * @return \Traversable' - name: count visibility: public parameters: [] comment: '# * Count the number of items in the collection. # * # * @return int' - name: countBy visibility: public parameters: - name: countBy default: 'null' comment: '# * Count the number of items in the collection by a field or using a callback. # * # * @param (callable(TValue, TKey): array-key)|string|null $countBy # * @return static' - name: zip visibility: public parameters: - name: items comment: '# * Zip the collection together with one or more arrays. # * # * e.g. new Collection([1, 2, 3])->zip([4, 5, 6]); # * => [[1, 4], [2, 5], [3, 6]] # * # * @template TZipValue # * # * @param \Illuminate\Contracts\Support\Arrayable|iterable ...$items # * @return static>' - name: collect visibility: public parameters: [] comment: '# * Collect the values into a collection. # * # * @return \Illuminate\Support\Collection' - name: toArray visibility: public parameters: [] comment: '# * Get the collection of items as a plain array. # * # * @return array' - name: jsonSerialize visibility: public parameters: [] comment: '# * Convert the object into something JSON serializable. # * # * @return mixed' - name: toJson visibility: public parameters: - name: options default: '0' comment: '# * Get the collection of items as JSON. # * # * @param int $options # * @return string' - name: getCachingIterator visibility: public parameters: - name: flags default: CachingIterator::CALL_TOSTRING comment: '# * Get a CachingIterator instance. # * # * @param int $flags # * @return \CachingIterator' - name: __toString visibility: public parameters: [] comment: '# * Convert the collection to its string representation. # * # * @return string' - name: escapeWhenCastingToString visibility: public parameters: - name: escape default: 'true' comment: '# * Indicate that the model''s string representation should be escaped when __toString is invoked. # * # * @param bool $escape # * @return $this' - name: proxy visibility: public parameters: - name: method comment: '# * Add a method to the list of proxied methods. # * # * @param string $method # * @return void' - name: __get visibility: public parameters: - name: key comment: '# * Dynamically access collection proxies. # * # * @param string $key # * @return mixed # * # * @throws \Exception' traits: - CachingIterator - Countable - Illuminate\Contracts\Support\Arrayable - Illuminate\Contracts\Support\Jsonable - IteratorAggregate - JsonSerializable - Traversable interfaces: []