hydrateMissingSnippets example

parent::__construct();
    }

    protected function configure(): void
    {
        $this->addOption('fix', 'f', InputOption::VALUE_NONE, 'Use this option to start a wizard to fix the snippets comfortably');
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $missingSnippetsArray = $this->snippetValidator->validate();
        $missingSnippetsCollection = $this->hydrateMissingSnippets($missingSnippetsArray);

        $io = new ShopwareStyle($input$output);

        if ($missingSnippetsCollection->count() === 0) {
            $io->success('Snippets are valid!');

            return self::SUCCESS;
        }

        if (!$input->getOption('fix')) {
            $io->error('Invalid snippets found!');
            
Home | Imprint | This part of the site doesn't use cookies.