From 8855b6c1d978fddb0a827d868c79e346986f565a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Tou=C5=A1ek?= Date: Wed, 20 May 2020 13:27:25 +0200 Subject: [PATCH] Fix Ds\Map methods (#3412) --- src/Psalm/Internal/Stubs/ext-ds.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Internal/Stubs/ext-ds.php b/src/Psalm/Internal/Stubs/ext-ds.php index e0c9a7312..1a134b045 100644 --- a/src/Psalm/Internal/Stubs/ext-ds.php +++ b/src/Psalm/Internal/Stubs/ext-ds.php @@ -195,7 +195,11 @@ final class Map implements Collection * @template TDefault * @param TKey $key * @param TDefault $default - * @return TValue|TDefault + * @return ( + * func_num_args() is 1 + * ? TValue + * : TValue|TDefault + * ) * @throws OutOfBoundsException */ public function get($key, $default = null) @@ -254,7 +258,11 @@ final class Map implements Collection * @template TDefault * @param TKey $key * @param TDefault $default - * @return TValue|TDefault + * @return ( + * func_num_args() is 1 + * ? TValue + * : TValue|TDefault + * ) * @throws \OutOfBoundsException */ public function remove($key, $default = null)