diff --git a/src/di-functions.php b/src/di-functions.php index 60472ce72ae1a17f946cdcc3cfe058d2bd617b34..b8a3af53bae278095931f28cfb66b649acaaa16c 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 ); } }