diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 85f21fac2f2..47b8bb4b3c2 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -511,7 +511,8 @@ 'BadMethodCallException::getPrevious' => ['?Throwable'], 'BadMethodCallException::getTrace' => ['list\',args?:array}>'], 'BadMethodCallException::getTraceAsString' => ['string'], -'base64_decode' => ['string|false', 'string'=>'string', 'strict='=>'bool'], +'base64_decode' => ['string', 'string'=>'string', 'strict='=>'false'], +'base64_decode\'1' => ['string|false', 'string'=>'string', 'strict='=>'true'], 'base64_encode' => ['string', 'string'=>'string'], 'base_convert' => ['string', 'num'=>'string', 'from_base'=>'int', 'to_base'=>'int'], 'basename' => ['string', 'path'=>'string', 'suffix='=>'string'], diff --git a/dictionaries/CallMap_historical.php b/dictionaries/CallMap_historical.php index 82344f93642..e0d17e99491 100644 --- a/dictionaries/CallMap_historical.php +++ b/dictionaries/CallMap_historical.php @@ -9404,7 +9404,8 @@ 'atan' => ['float', 'num'=>'float'], 'atan2' => ['float', 'y'=>'float', 'x'=>'float'], 'atanh' => ['float', 'num'=>'float'], - 'base64_decode' => ['string|false', 'string'=>'string', 'strict='=>'bool'], + 'base64_decode' => ['string', 'string'=>'string', 'strict='=>'false'], + 'base64_decode\'1' => ['string|false', 'string'=>'string', 'strict='=>'true'], 'base64_encode' => ['string', 'string'=>'string'], 'base_convert' => ['string', 'num'=>'string', 'from_base'=>'int', 'to_base'=>'int'], 'basename' => ['string', 'path'=>'string', 'suffix='=>'string'], diff --git a/stubs/CoreGenericFunctions.phpstub b/stubs/CoreGenericFunctions.phpstub index 5e2640e1a1f..f3fa3bbc1c3 100644 --- a/stubs/CoreGenericFunctions.phpstub +++ b/stubs/CoreGenericFunctions.phpstub @@ -1559,7 +1559,10 @@ function unpack(string $format, string $string, int $offset = 0) {} /** * @psalm-pure * + * @template T of bool + * @param T $strict * @return string|false + * @psalm-return (T is false ? string : string|false) * * @psalm-flow ($string) -> return * @psalm-ignore-falsable-return