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); } /**