Skip to content

Commit

Permalink
Adds psalm assertion to plugin manager interface validate()
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Jun 13, 2022
1 parent f318788 commit c9742ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PluginManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* Interface for a plugin manager
*
* A plugin manager is a specialized service locator used to create homogeneous objects
*
* @template InstanceType of object
*/
interface PluginManagerInterface extends ServiceLocatorInterface
{
Expand All @@ -22,6 +24,7 @@ interface PluginManagerInterface extends ServiceLocatorInterface
* @throws InvalidServiceException If created instance does not respect the
* constraint on type imposed by the plugin manager.
* @throws ContainerExceptionInterface If any other error occurs.
* @psalm-assert InstanceType $instance
*/
public function validate($instance);
}

0 comments on commit c9742ff

Please sign in to comment.