Skip to content
Permalink
Browse files

Replace condition for module input. Improve the code presentation (#3855

)
  • Loading branch information...
LOBsTerr authored and jmolivas committed Apr 22, 2018
1 parent b5daec5 commit 390a1316b395b0a8ea3349478fe05e38253070f5
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/Command/Shared/ProjectDownloadTrait.php
@@ -37,7 +37,7 @@ public function modulesQuestion()
true
);
if (empty($moduleName) && is_numeric($moduleName)) {
if (empty($moduleName) || is_numeric($moduleName)) {
break;
}
@@ -166,7 +166,7 @@ public function downloadProject($project, $version, $type, $path = null)
$this->getIo()->comment(
sprintf(
$this->trans('commands.'.$commandKey.'.messages.downloading'),
$this->trans('commands.' . $commandKey . '.messages.downloading'),
$project,
$version
)
@@ -201,7 +201,7 @@ public function downloadProject($project, $version, $type, $path = null)
}
$zippy = Zippy::load();
if (PHP_OS === "WIN32" || PHP_OS === "WINNT") {
if (PHP_OS === 'WIN32' || PHP_OS === 'WINNT') {
$container = AdapterContainer::load();
$container['Drupal\\Console\\Zippy\\Adapter\\TarGzGNUTarForWindowsAdapter'] = function ($container) {
return TarGzGNUTarForWindowsAdapter::newInstance(
@@ -263,17 +263,17 @@ public function releasesQuestion($project, $latest = false, $stable = false)
$this->getIo()->comment(
sprintf(
$this->trans('commands.'.$commandKey.'.messages.getting-releases'),
$this->trans('commands.' . $commandKey . '.messages.getting-releases'),
implode(',', [$project])
)
);
$releases = $this->drupalApi->getProjectReleases($project, $latest?1:15, $stable);
$releases = $this->drupalApi->getProjectReleases($project, $latest? 1 : 15, $stable);
if (!$releases) {
$this->getIo()->error(
sprintf(
$this->trans('commands.'.$commandKey.'.messages.no-releases'),
$this->trans('commands.' . $commandKey . '.messages.no-releases'),
implode(',', [$project])
)
);
@@ -286,7 +286,7 @@ public function releasesQuestion($project, $latest = false, $stable = false)
}
$version = $this->getIo()->choice(
$this->trans('commands.'.$commandKey.'.messages.select-release'),
$this->trans('commands.' . $commandKey . '.messages.select-release'),
$releases
);

0 comments on commit 390a131

Please sign in to comment.
You can’t perform that action at this time.