public function format(string $question, string $default = null): string {
    if($default != '') {
      $default = sprintf('[%s]', $default);
    }

    return trim($question . $default) . sprintf('%s  ', $this->getDelimiter());
  }
public function format(string $question, string $default = null): string {
    if($default != '') {
      $default = sprintf('[%s]', $default);
    }

    return trim($question . $default) . sprintf('%s  ', $this->getDelimiter());
  }
public function format ( string $ question , string $ default = null ) : string { if ( $ default != '' ) { $ default = sprintf ( '[%s]' , $ default ) ; } return trim ( $ question . $ default ) . sprintf ( '%s  ' , $ this -> getDelimiter ( ) ) ; }
If the default is not empty, is appended to the question in square brackets. Both are concatenated, trimmed and the the delmiter is appended with two closing spaces

@param string $question
@param string $default
@return string
If the default is not empty is appended to the question in square brackets . Both are concatenated trimmed and the the delmiter is appended with two closing spaces