Adds type hinting

This commit is contained in:
luke
2021-06-18 22:01:16 +01:00
parent 4b55de27f1
commit 27de6106ab
4 changed files with 16 additions and 10 deletions

View File

@ -10,14 +10,14 @@ namespace Pest\Concerns;
trait RetrievesValues
{
/**
* @template TValue
* @template TRetrievableValue
*
* Safely retrieve the value at the given key from an object or array.
*
* @param array<string, TValue>|object $value
* @param TValue|null $default
* @param array<string, TRetrievableValue>|object $value
* @param TRetrievableValue|null $default
*
* @return TValue|null
* @return TRetrievableValue|null
*/
private function retrieve(string $key, $value, $default = null)
{