module/CLI/src/Command/Shortcode/GenerateShortcodeCommand.php 1 location
|
@@ 75-89 (lines=15) @@
|
| 72 |
|
)); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
public function interact(InputInterface $input, OutputInterface $output) |
| 76 |
|
{ |
| 77 |
|
$io = new SymfonyStyle($input, $output); |
| 78 |
|
$longUrl = $input->getArgument('longUrl'); |
| 79 |
|
if (! empty($longUrl)) { |
| 80 |
|
return; |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
$longUrl = $io->ask( |
| 84 |
|
$this->translator->translate('A long URL was not provided. Which URL do you want to be shortened?') |
| 85 |
|
); |
| 86 |
|
if (! empty($longUrl)) { |
| 87 |
|
$input->setArgument('longUrl', $longUrl); |
| 88 |
|
} |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
public function execute(InputInterface $input, OutputInterface $output) |
| 92 |
|
{ |
module/CLI/src/Command/Shortcode/GetVisitsCommand.php 1 location
|
@@ 61-75 (lines=15) @@
|
| 58 |
|
); |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
public function interact(InputInterface $input, OutputInterface $output) |
| 62 |
|
{ |
| 63 |
|
$shortCode = $input->getArgument('shortCode'); |
| 64 |
|
if (! empty($shortCode)) { |
| 65 |
|
return; |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
$io = new SymfonyStyle($input, $output); |
| 69 |
|
$shortCode = $io->ask( |
| 70 |
|
$this->translator->translate('A short code was not provided. Which short code do you want to use?') |
| 71 |
|
); |
| 72 |
|
if (! empty($shortCode)) { |
| 73 |
|
$input->setArgument('shortCode', $shortCode); |
| 74 |
|
} |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
public function execute(InputInterface $input, OutputInterface $output) |
| 78 |
|
{ |
module/CLI/src/Command/Shortcode/ResolveUrlCommand.php 1 location
|
@@ 47-61 (lines=15) @@
|
| 44 |
|
); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
public function interact(InputInterface $input, OutputInterface $output) |
| 48 |
|
{ |
| 49 |
|
$shortCode = $input->getArgument('shortCode'); |
| 50 |
|
if (! empty($shortCode)) { |
| 51 |
|
return; |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
$io = new SymfonyStyle($input, $output); |
| 55 |
|
$shortCode = $io->ask( |
| 56 |
|
$this->translator->translate('A short code was not provided. Which short code do you want to parse?') |
| 57 |
|
); |
| 58 |
|
if (! empty($shortCode)) { |
| 59 |
|
$input->setArgument('shortCode', $shortCode); |
| 60 |
|
} |
| 61 |
|
} |
| 62 |
|
|
| 63 |
|
public function execute(InputInterface $input, OutputInterface $output) |
| 64 |
|
{ |