Files
framework/php-packages/phpstan/stubs/Illuminate/Enumerable.stub
Matthew Kilgore 05aa62f70c feat: STUBS!
2021-12-01 17:36:36 -05:00

59 lines
1.3 KiB
Plaintext

<?php
namespace Illuminate\Support;
/**
* @template TKey
* @template TValue
*
* @extends \IteratorAggregate<TKey, TValue>
*/
interface Enumerable extends \Countable, \IteratorAggregate, \JsonSerializable
{
/**
* @param string|callable(TValue, TKey): bool $key
* @param mixed $operator
* @param mixed $value
* @return static<static>
*/
public function partition($key, $operator = null, $value = null);
/**
* @param string|callable(TValue, TKey): mixed $keyBy
* @return static<TValue>
*/
public function keyBy($keyBy);
/**
* @param callable(TValue, TKey): array<mixed> $callback
* @return static<mixed>
*/
public function mapWithKeys(callable $callback);
/**
* @param callable(TValue, TKey): array<mixed> $callback
* @return static<array<mixed>>
*/
public function mapToDictionary(callable $callback);
/**
* @param string|callable(TValue, TKey): bool $key
* @param mixed $operator
* @param mixed $value
* @return bool
*/
public function every($key, $operator = null, $value = null);
/**
* @param int $size
* @return static<static>
*/
public function chunk($size);
/**
* @param callable(static): void $callable
* @return static
*/
public function tap($callable);
}