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