8000 Various fixes by pborreli · Pull Request #119 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Various fixes #119

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

Merged
16 commits merged into from
Feb 27, 2011
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[Console] Removed useless else
  • Loading branch information
pborreli committed Feb 27, 2011
commit 46d28ce1b153d61d7e6276e107e3a3d1647a4497
8 changes: 4 additions & 4 deletions src/Symfony/Component/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ public function run(InputInterface $input = null, OutputInterface $output = null
// @codeCoverageIgnoreStart
exit($statusCode);
// @codeCoverageIgnoreEnd
} else {
return $statusCode;
}

return $statusCode;
}

/**
Expand Down Expand Up @@ -315,9 +315,9 @@ public function getLongVersion()
{
if ('UNKNOWN' !== $this->getName() && 'UNKNOWN' !== $this->getVersion()) {
return sprintf('<info>%s</info> version <comment>%s</comment>', $this->getName(), $this->getVersion());
} else {
return '<info>Console Tool</info>';
}

return '<info>Console Tool</info>';
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Console/Command/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ public function run(InputInterface $input, OutputInterface $output)

if ($this->code) {
return call_user_func($this->code, $input, $output);
} else {
return $this->execute($input, $output);
}

return $this->execute($input, $output);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Console/Helper/DialogHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ public function askConfirmation(OutputInterface $output, $question, $default = t

if (false === $default) {
return $answer && 'y' == strtolower($answer[0]);
} else {
return !$answer || 'y' == strtolower($answer[0]);
}

return !$answer || 'y' == strtolower($answer[0]);
// @codeCoverageIgnoreEnd
}

Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Console/Input/ArgvInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ public function getParameterOption($values, $default = false)
if (0 === strpos($token, $value)) {
if (false !== $pos = strpos($token, '=')) {
return substr($token, $pos + 1);
} else {
return array_shift($tokens);
}

return array_shift($tokens);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Console/Output/StreamOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ protected function hasColorSupport()
// @codeCoverageIgnoreStart
if (DIRECTORY_SEPARATOR == '\\') {
return false !== getenv('ANSICON');
} else {
return function_exists('posix_isatty') && @posix_isatty($this->stream);
}

return function_exists('posix_isatty') && @posix_isatty($this->stream);
// @codeCoverageIgnoreEnd
}
}
0