mirror of
https://github.com/flarum/core.git
synced 2025-08-07 00:47:00 +02:00
feat: STUBS!
This commit is contained in:
58
php-packages/phpstan/stubs/Illuminate/Enumerable.stub
Normal file
58
php-packages/phpstan/stubs/Illuminate/Enumerable.stub
Normal file
@@ -0,0 +1,58 @@
|
||||
<?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);
|
||||
}
|
Reference in New Issue
Block a user