InputDefinition example

private function fetchAllCarts(): array
    {
        return $this->connection->fetchAllAssociative('SELECT * FROM cart');
    }

    private function createInputDefinition(): InputDefinition
    {
        $type = new InputArgument('type', InputArgument::OPTIONAL);
        $days = new InputOption('days', null, InputOption::VALUE_REQUIRED);
        $all = new InputOption('all', null, InputOption::VALUE_NONE);

        return new InputDefinition([$type$days$all]);
    }

    private function fetchFirstIdFromTable(string $table): string
    {
        return Uuid::fromBytesToHex((string) $this->connection->fetchOne('SELECT id FROM ' . $table . ' LIMIT 1'));
    }

    private function getCommand(): CleanPersonalDataCommand
    {
        return new CleanPersonalDataCommand($this->connection, $this->customerRepository);
    }

    
Home | Imprint | This part of the site doesn't use cookies.