Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add success return to all cli commands #63

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Command/ClearLastImportLogCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Jh\Import\Config\Data;
use Jh\Import\Entity\ImportHistoryResource;
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\Console\Cli;
use Magento\Framework\DB\Adapter\AdapterInterface;
use Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory;
use Symfony\Component\Console\Command\Command;
Expand Down Expand Up @@ -84,5 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$importName
)
);

return Cli::RETURN_SUCCESS;
}
}
3 changes: 3 additions & 0 deletions src/Command/ListImportsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Jh\Import\Config\Data;
use Jh\Import\Locker\Locker;
use Magento\Cron\Model\Config;
use Magento\Framework\Console\Cli;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputArgument;
Expand Down Expand Up @@ -78,5 +79,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
->render();

$output->writeln('');

return Cli::RETURN_SUCCESS;
}
}
3 changes: 3 additions & 0 deletions src/Command/UnlockImportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Jh\Import\Config\Data;
use Jh\Import\Locker\Locker;
use Magento\Framework\Console\Cli;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -54,5 +55,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$this->locker->release($importName);
$output->writeln(sprintf('<info>The lock for import: "%s" has been released</info>', $importName));

return Cli::RETURN_SUCCESS;
}
}
3 changes: 3 additions & 0 deletions src/Command/ViewLocksCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Jh\Import\Config\Data;
use Jh\Import\Locker\Locker;
use Magento\Framework\Console\Cli;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -63,5 +64,7 @@ function (string $importName) {
->render();

$output->writeln('');

return Cli::RETURN_SUCCESS;
}
}
3 changes: 3 additions & 0 deletions src/Command/ViewLogsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Jh\Import\Command;

use Jh\Import\Config\Data;
use Magento\Framework\Console\Cli;
use Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
Expand Down Expand Up @@ -122,5 +123,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
];
}, $itemLogCollection->getItems()))
->render();

return Cli::RETURN_SUCCESS;
}
}