mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-26 20:34:48 +01:00
97 lines
1.9 KiB
Plaintext
97 lines
1.9 KiB
Plaintext
<?php
|
|
|
|
namespace Illuminate\Support;
|
|
|
|
/**
|
|
* @template TKey
|
|
* @template TValue
|
|
* @implements \ArrayAccess<TKey, TValue>
|
|
* @implements Enumerable<TKey, TValue>
|
|
*/
|
|
class Collection implements \ArrayAccess, Enumerable
|
|
{
|
|
/**
|
|
* The items contained in the collection.
|
|
*
|
|
* @var array<TKey, TValue>
|
|
*/
|
|
protected $items = [];
|
|
|
|
/**
|
|
* Create a new collection.
|
|
*
|
|
* @param array<TKey, TValue> $items
|
|
* @return void
|
|
*/
|
|
public function __construct($items = []) {}
|
|
|
|
/**
|
|
* @param callable|null $callback
|
|
* @param mixed $default
|
|
* @return TValue|null
|
|
*/
|
|
public function first(callable $callback = null, $default = null){}
|
|
|
|
/**
|
|
* @return static<TValue, TKey>
|
|
*/
|
|
public function flip(){}
|
|
|
|
/**
|
|
* @param callable|null $callback
|
|
* @param mixed $default
|
|
* @return TValue|null
|
|
*/
|
|
public function last(callable $callback = null, $default = null){}
|
|
|
|
/**
|
|
* @param mixed $key
|
|
* @param mixed $default
|
|
* @return TValue|null
|
|
*/
|
|
public function get($key, $default = null) {}
|
|
|
|
/**
|
|
* @return TValue|null
|
|
*/
|
|
public function pop() {}
|
|
|
|
/**
|
|
* @param mixed $key
|
|
* @param mixed $default
|
|
* @return TValue|null
|
|
*/
|
|
public function pull($key, $default = null) {}
|
|
|
|
/**
|
|
* @param mixed $value
|
|
* @param bool $strict
|
|
* @return TKey|false
|
|
*/
|
|
public function search($value, $strict = false) {}
|
|
|
|
/**
|
|
* @return TValue|null
|
|
*/
|
|
public function shift() {}
|
|
|
|
/**
|
|
* @return array<TKey, TValue>
|
|
*/
|
|
public function all() {}
|
|
|
|
/**
|
|
* @param TKey $key
|
|
* @param TValue $value
|
|
* @return $this
|
|
*/
|
|
public function put($key, $value) {}
|
|
|
|
/**
|
|
* Get an iterator for the items.
|
|
*
|
|
* @return \ArrayIterator<TKey, TValue>
|
|
*/
|
|
public function getIterator() {}
|
|
}
|