Task/Doctrine/DoctrineBatchWriterTask.php
public function execute(ProcessState $state)
    {
        $this->batch[] = $state->getInput();

        if (\count($this->batch) >= $this->getOption($state, 'batch_count')) {
            $this->writeBatch($state);
        } else {
            $state->setSkipped(true);
        }
    }
public function execute(ProcessState $state)
    {
        $this->batch[] = $state->getInput();

        if (\count($this->batch) >= $this->getOption($state, 'batch_count')) {
            $this->writeBatch($state);
        } else {
            $state->setSkipped(true);
        }
    }
@param ProcessState $state

@throws \Doctrine\ORM\ORMInvalidArgumentException
@throws \UnexpectedValueException
@throws \Symfony\Component\OptionsResolver\Exception\ExceptionInterface
@throws \InvalidArgumentException