From fa2039f57e3bc41e28d44742c31bf463b7dc6a7b Mon Sep 17 00:00:00 2001 From: Bart Jaskulski <bjaskulski@protonmail.com> Date: Mon, 7 Oct 2024 18:00:33 +0200 Subject: [PATCH] fix: remove PHP 8 typing Signed-off-by: Bart Jaskulski <bjaskulski@protonmail.com> --- src/di-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/di-functions.php b/src/di-functions.php index 60472ce..b8a3af5 100644 --- a/src/di-functions.php +++ b/src/di-functions.php @@ -59,7 +59,7 @@ if ( ! function_exists( 'WPDesk\Init\DI\factory' ) ) { * @param callable|array|string $factory The factory is a callable that takes the container as parameter * and returns the value to register in the container. */ - function factory( callable|array|string $factory ): FactoryDefinitionHelper { + function factory( $factory ): FactoryDefinitionHelper { return new FactoryDefinitionHelper( $factory ); } } @@ -77,7 +77,7 @@ if ( ! function_exists( 'WPDesk\Init\DI\decorate' ) ) { * @param callable $callable The callable takes the decorated object as first parameter and * the container as second. */ - function decorate( callable|array|string $callable ): FactoryDefinitionHelper { + function decorate( $callable ): FactoryDefinitionHelper { return new FactoryDefinitionHelper( $callable, true ); } } -- GitLab