translator = $translator; parent::__construct(); } public function configure() { $this->setName(self::NAME) ->setDescription(sprintf($this->translator->translate( 'Generates a character set sample just by shuffling the default one, "%s". ' . 'Then it can be set in the SHORTCODE_CHARS environment variable' ), UrlShortener::DEFAULT_CHARS)); } public function execute(InputInterface $input, OutputInterface $output) { $charSet = str_shuffle(UrlShortener::DEFAULT_CHARS); (new SymfonyStyle($input, $output))->success( \sprintf($this->translator->translate('Character set: "%s"'), $charSet) ); } }