More understandable argument name

This commit is contained in:
slawkens 2024-11-10 20:25:42 +01:00
parent 011a85d8ae
commit 7e67e11e16

View File

@ -14,14 +14,14 @@ class PluginInstallCommand extends Command
{ {
$this->setName('plugin:install') $this->setName('plugin:install')
->setDescription('This command installs plugin') ->setDescription('This command installs plugin')
->addArgument('plugin', InputArgument::REQUIRED, 'Path to zip file (plugin) that you want to install'); ->addArgument('pathToPluginZip', InputArgument::REQUIRED, 'Path to zip file (plugin) that you want to install');
} }
protected function execute(InputInterface $input, OutputInterface $output): int protected function execute(InputInterface $input, OutputInterface $output): int
{ {
$io = new SymfonyStyle($input, $output); $io = new SymfonyStyle($input, $output);
$pathToFile = $input->getArgument('plugin'); $pathToFile = $input->getArgument('pathToPluginZip');
$ext = strtolower(pathinfo($pathToFile, PATHINFO_EXTENSION)); $ext = strtolower(pathinfo($pathToFile, PATHINFO_EXTENSION));
if($ext !== 'zip') {// check if it is zipped/compressed file if($ext !== 'zip') {// check if it is zipped/compressed file