hasRunnableOptimizer example

if ($input->getOption('modified')) {
            $errors = date_parse($input->getOption('modified'))['errors'];
            if ($errors) {
                $output->writeln("<error>You have provided an invalid date string! Please only use a valid date string that conists of 'd-m-Y' e.g '10-05-2022'. You can also provide 'd-m-Y h:i:s' e.g '10-05-2022 10:15:00'. If you want to enhance the date even further you can consult the PHP documentation regarding valid formats https://www.php.net/manual/en/datetime.formats.php' </error>");

                return 1;
            }
        }

        if ($this->hasRunnableOptimizer() === false) {
            $output->writeln('<error>No runnable optimizer found. Consider installing one of the following optimizers.</error>');
            $this->displayCapabilities($output$optimizerService->getOptimizers());

            return 1;
        }

        if ($input->getOption('info')) {
            $this->displayCapabilities($output$optimizerService->getOptimizers());

            return 0;
        }

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