From 2e6595ab6b645eec6c53e1ce80d5762ec2c480e2 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sat, 16 Dec 2023 11:04:57 +0100 Subject: [PATCH] check --- src/NodeFactory/Service/ServiceOptionNodeFactory.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/NodeFactory/Service/ServiceOptionNodeFactory.php b/src/NodeFactory/Service/ServiceOptionNodeFactory.php index 161d52d..b1482df 100644 --- a/src/NodeFactory/Service/ServiceOptionNodeFactory.php +++ b/src/NodeFactory/Service/ServiceOptionNodeFactory.php @@ -8,6 +8,7 @@ use Symplify\PhpConfigPrinter\Contract\Converter\ServiceOptionsKeyYamlToPhpFactoryInterface; use Symplify\PhpConfigPrinter\ServiceOptionAnalyzer\ServiceOptionAnalyzer; use Symplify\PhpConfigPrinter\ValueObject\YamlServiceKey; +use Webmozart\Assert\Assert; final class ServiceOptionNodeFactory { @@ -18,6 +19,8 @@ public function __construct( private readonly ServiceOptionAnalyzer $serviceOptionAnalyzer, private readonly iterable $serviceOptionKeyYamlToPhpFactories ) { + Assert::notEmpty($serviceOptionKeyYamlToPhpFactories); + Assert::allIsInstanceOf($serviceOptionKeyYamlToPhpFactories, ServiceOptionsKeyYamlToPhpFactoryInterface::class); } /**