Skip to content

Commit 9aa322f

Browse files
author
Ivan Gavryshko
committed
MAGETWO-38202: Create skelton language uninstall command
- changes according to CR
1 parent 3ad65b2 commit 9aa322f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

app/code/Magento/Translation/Console/Command/UninstallLanguageCommand.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
113113
{
114114
$languages = $input->getArgument(self::PACKAGE_ARGUMENT);
115115
$packagesToRemove = [];
116-
117116
$dependencies = $this->dependencyChecker->checkDependencies($languages, true);
118117

119118
foreach ($languages as $package) {
120-
121119
if (!$this->validate($package)) {
122-
$output->writeln("<info>Package $package is not magento language and will be skipped.</info>");
120+
$output->writeln("<info>Package $package is not a magento language and will be skipped.</info>");
123121
} else {
124122
if (sizeof($dependencies[$package]) > 0) {
125123
$output->writeln("<info>Package $package has dependencies and will be skipped.</info>");
@@ -130,11 +128,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
130128
}
131129

132130
if ($packagesToRemove !== []) {
133-
134131
if ($input->getOption(self::BACKUP_CODE_OPTION)) {
135-
$time = time();
136132
$backupRestore = $this->backupRollbackFactory->create($output);
137-
$backupRestore->codeBackup($time);
133+
$backupRestore->codeBackup(time());
138134
} else {
139135
$output->writeln('<info>You are removing language package without a code backup.</info>');
140136
}

0 commit comments

Comments
 (0)