1
0
Fork 0

Fix typo in local variable name

pull/6228/head
Alexander Schwenn 2017-03-05 16:19:03 +01:00
parent 9e592f5748
commit 77e104bd4d
1 changed files with 9 additions and 9 deletions

View File

@ -323,11 +323,11 @@ EOT
$hasOutdatedPackages = false; $hasOutdatedPackages = false;
foreach ($packages[$type] as $package) { foreach ($packages[$type] as $package) {
if (is_object($package)) { if (is_object($package)) {
$latestPackackage = null; $latestPackage = null;
if ($showLatest && isset($latestPackages[$package->getPrettyName()])) { if ($showLatest && isset($latestPackages[$package->getPrettyName()])) {
$latestPackackage = $latestPackages[$package->getPrettyName()]; $latestPackage = $latestPackages[$package->getPrettyName()];
} }
if ($input->getOption('outdated') && $latestPackackage && $latestPackackage->getFullPrettyVersion() === $package->getFullPrettyVersion() && !$latestPackackage->isAbandoned()) { if ($input->getOption('outdated') && $latestPackage && $latestPackage->getFullPrettyVersion() === $package->getFullPrettyVersion() && !$latestPackage->isAbandoned()) {
continue; continue;
} elseif ($input->getOption('outdated')) { } elseif ($input->getOption('outdated')) {
$hasOutdatedPackages = true; $hasOutdatedPackages = true;
@ -339,9 +339,9 @@ EOT
$io->write(' ' . str_pad($package->getFullPrettyVersion(), $versionLength, ' '), false); $io->write(' ' . str_pad($package->getFullPrettyVersion(), $versionLength, ' '), false);
} }
if ($writeLatest && $latestPackackage) { if ($writeLatest && $latestPackage) {
$latestVersion = $latestPackackage->getFullPrettyVersion(); $latestVersion = $latestPackage->getFullPrettyVersion();
$style = $this->getVersionStyle($latestPackackage, $package); $style = $this->getVersionStyle($latestPackage, $package);
if (!$io->isDecorated()) { if (!$io->isDecorated()) {
$latestVersion = str_replace(array('info', 'highlight', 'comment'), array('=', '!', '~'), $style) . ' ' . $latestVersion; $latestVersion = str_replace(array('info', 'highlight', 'comment'), array('=', '!', '~'), $style) . ' ' . $latestVersion;
} }
@ -365,9 +365,9 @@ EOT
$io->write(' ' . $path, false); $io->write(' ' . $path, false);
} }
if ($latestPackackage && $latestPackackage->isAbandoned()) { if ($latestPackage && $latestPackage->isAbandoned()) {
$replacement = (is_string($latestPackackage->getReplacementPackage())) $replacement = (is_string($latestPackage->getReplacementPackage()))
? 'Use ' . $latestPackackage->getReplacementPackage() . ' instead' ? 'Use ' . $latestPackage->getReplacementPackage() . ' instead'
: 'No replacement was suggested'; : 'No replacement was suggested';
$io->writeError(''); $io->writeError('');