Browse Source

Better ternary syntax.

euromark 11 years ago
parent
commit
e4484e2f28
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Console/ConsoleInputOption.php

+ 1 - 1
src/Console/ConsoleInputOption.php

@@ -145,7 +145,7 @@ class ConsoleInputOption {
  * @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;