mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Adds generics
This commit is contained in:
@ -10,12 +10,14 @@ namespace Pest\Concerns;
|
||||
trait RetrievesValues
|
||||
{
|
||||
/**
|
||||
* @template TValue
|
||||
*
|
||||
* Safely retrieve the value at the given key from an object or array.
|
||||
*
|
||||
* @param array<mixed>|object $value
|
||||
* @param mixed $default
|
||||
* @param array<string, TValue>|object $value
|
||||
* @param TValue|null $default
|
||||
*
|
||||
* @return mixed
|
||||
* @return TValue|null
|
||||
*/
|
||||
private function retrieve(string $key, $value, $default = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user