Skip to content

Commit

Permalink
Better ternary syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Nov 21, 2014
1 parent 0e90d71 commit e4484e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Console/ConsoleInputOption.php
Expand Up @@ -145,7 +145,7 @@ public function help($width = 0) {
* @return string
*/
public function usage() {
$name = strlen($this->_short) < 1 ? '--' . $this->_name : '-' . $this->_short;
$name = (strlen($this->_short) > 0) ? ('-' . $this->_short) : ('--' . $this->_name);
$default = '';
if (!empty($this->_default) && $this->_default !== true) {
$default = ' ' . $this->_default;
Expand Down

0 comments on commit e4484e2

Please sign in to comment.