seeder = $seeder; $this->addOption( 'v6', null, InputOption::VALUE_NONE, 'train with IPv6 data' ); $this->setDescription('Fills the database with random IPs for development and testing purposes'); $this->config = $config; } protected function execute(InputInterface $input, OutputInterface $output): int { if ($this->config->getSystemValueBool('debug', false) === false) { $output->writeln('This command is meant for development purposes. Enable debug mode and try again if you know what you are doing.'); return 1; } $num = $this->seeder->seed( $input->getOption('v6') ? new IpV6Strategy() : new Ipv4Strategy() ); $output->writeln("$num rows created"); return 0; } }