From c6648aff8780c94be3051c76576c48104062879f Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:47:34 +0200 Subject: [PATCH] add FILTER_SANITIZE_URL filter to filter_var --- .../Provider/ReturnTypeProvider/FilterVarReturnTypeProvider.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Psalm/Internal/Provider/ReturnTypeProvider/FilterVarReturnTypeProvider.php b/src/Psalm/Internal/Provider/ReturnTypeProvider/FilterVarReturnTypeProvider.php index cbc06baf8c8..19c839c44b3 100644 --- a/src/Psalm/Internal/Provider/ReturnTypeProvider/FilterVarReturnTypeProvider.php +++ b/src/Psalm/Internal/Provider/ReturnTypeProvider/FilterVarReturnTypeProvider.php @@ -17,6 +17,7 @@ use function in_array; use const FILTER_NULL_ON_FAILURE; +use const FILTER_SANITIZE_URL; use const FILTER_VALIDATE_BOOLEAN; use const FILTER_VALIDATE_DOMAIN; use const FILTER_VALIDATE_EMAIL; @@ -78,6 +79,7 @@ public static function getFunctionReturnType(FunctionReturnTypeProviderEvent $ev case FILTER_VALIDATE_URL: case FILTER_VALIDATE_EMAIL: case FILTER_VALIDATE_DOMAIN: + case FILTER_SANITIZE_URL: $filter_type = Type::getString(); break; }