2323 *
2424 * @codeCoverageIgnore
2525 */
26- #[AsCommand('code-rhapsodie:dataflow:execute ' , 'Runs one dataflow type with provided options ' )]
26+ #[AsCommand('code-rhapsodie:dataflow:execute ' , 'Runs one dataflow type with provided options ' , help: <<<'TXT'
27+ The <info>%command.name%</info> command runs one dataflow with the provided options.
28+
29+ <info>php %command.full_name% App\Dataflow\MyDataflow '{"option1": "value1", "option2": "value2"}'</info>
30+ TXT)]
2731class ExecuteDataflowCommand extends Command implements LoggerAwareInterface
2832{
2933 use LoggerAwareTrait;
@@ -36,13 +40,6 @@ public function __construct(private DataflowTypeRegistryInterface $registry, pri
3640 protected function configure (): void
3741 {
3842 $ this
39- ->setHelp (
40- <<<'EOF'
41- The <info>%command.name%</info> command runs one dataflow with the provided options.
42-
43- <info>php %command.full_name% App\Dataflow\MyDataflow '{"option1": "value1", "option2": "value2"}'</info>
44- EOF
45- )
4643 ->addArgument ('fqcn ' , InputArgument::REQUIRED , 'FQCN or alias of the dataflow type ' )
4744 ->addArgument ('options ' , InputArgument::OPTIONAL , 'Options for the dataflow type as a json string ' , '[] ' )
4845 ->addOption ('connection ' , null , InputOption::VALUE_REQUIRED , 'Define the DBAL connection to use ' );
@@ -54,7 +51,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5451 $ this ->connectionFactory ->setConnectionName ($ input ->getOption ('connection ' ));
5552 }
5653 $ fqcnOrAlias = $ input ->getArgument ('fqcn ' );
57- $ options = json_decode ($ input ->getArgument ('options ' ), true , 512 , \JSON_THROW_ON_ERROR );
54+ $ options = json_decode (( string ) $ input ->getArgument ('options ' ), true , 512 , \JSON_THROW_ON_ERROR );
5855 $ io = new SymfonyStyle ($ input , $ output );
5956
6057 $ dataflowType = $ this ->registry ->getDataflowType ($ fqcnOrAlias );
0 commit comments