From 5b78125d1156164979b5741e2542298afa133fe1 Mon Sep 17 00:00:00 2001 From: adrew Date: Fri, 28 Jan 2022 15:16:40 +0300 Subject: [PATCH] Add doc for DynamicFunctionStorageProviderInterface --- docs/running_psalm/plugins/authoring_plugins.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/running_psalm/plugins/authoring_plugins.md b/docs/running_psalm/plugins/authoring_plugins.md index 494313970..9690a1b4b 100644 --- a/docs/running_psalm/plugins/authoring_plugins.md +++ b/docs/running_psalm/plugins/authoring_plugins.md @@ -92,6 +92,7 @@ class SomePlugin implements \Psalm\Plugin\EventHandler\AfterStatementAnalysisInt - `PropertyExistenceProviderInterface` - can be used to override Psalm's builtin property existence checks for one or more classes. - `PropertyTypeProviderInterface` - can be used to override Psalm's builtin property type lookup for one or more classes. - `PropertyVisibilityProviderInterface` - can be used to override Psalm's builtin property visibility checks for one or more classes. +- `DynamicFunctionStorageProviderInterface` - can be used to override signature for one or more functions. It means you can define variadic param list. Infer return type by input args. Define function templates. Also check out `Psalm\Plugin\DynamicFunctionStorage` to find out what api it brings for you to change function's definition. Here are a couple of example plugins: - [StringChecker](https://github.com/vimeo/psalm/blob/master/examples/plugins/StringChecker.php) - checks class references in strings