mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-27 04:45:26 +01:00
90 lines
1.7 KiB
Plaintext
90 lines
1.7 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) {}
|
|
}
|