original_string: public function text($width = 72)
      {
          $parser = $this->_parser;
          $out = [];
          $description = $parser->getDescription();
          if (!empty($description)) {
              $out[] = Text::wrap($description, $width);
              $out[] = '';
          }
          $out[] = '<info>Usage:</info>';
          $out[] = $this->_generateUsage();
          $out[] = '';
          $subcommands = $parser->subcommands();
          if (!empty($subcommands)) {
              $out[] = '<info>Subcommands:</info>';
              $out[] = '';
              $max = $this->_getMaxLength($subcommands) + 2;
              foreach ($subcommands as $command) {
                  $out[] = Text::wrapBlock($command->help($max), [
                      'width' => $width,
                      'indent' => str_repeat(' ', $max),
                      'indentAt' => 1
                  ]);
              }
              $out[] = '';
              $out[] = sprintf('To see help on a subcommand use <info>`' . $this->_alias . ' %s [subcommand] --help`</info>', $parser->getCommand());
              $out[] = '';
          }
  
          $options = $parser->options();
          if (!empty($options)) {
              $max = $this->_getMaxLength($options) + 8;
              $out[] = '<info>Options:</info>';
              $out[] = '';
              foreach ($options as $option) {
                  $out[] = Text::wrapBlock($option->help($max), [
                      'width' => $width,
                      'indent' => str_repeat(' ', $max),
                      'indentAt' => 1
                  ]);
              }
              $out[] = '';
          }
  
          $arguments = $parser->arguments();
          if (!empty($arguments)) {
              $max = $this->_getMaxLength($arguments) + 2;
              $out[] = '<info>Arguments:</info>';
              $out[] = '';
              foreach ($arguments as $argument) {
                  $out[] = Text::wrapBlock($argument->help($max), [
                      'width' => $width,
                      'indent' => str_repeat(' ', $max),
                      'indentAt' => 1
                  ]);
              }
              $out[] = '';
          }
          $epilog = $parser->getEpilog();
          if (!empty($epilog)) {
              $out[] = Text::wrap($epilog, $width);
              $out[] = '';
          }
  
          return implode("\n", $out);
      }
code: public function text($width = 72)
      {
          $parser = $this->_parser;
          $out = [];
          $description = $parser->getDescription();
          if (!empty($description)) {
              $out[] = Text::wrap($description, $width);
              $out[] = '';
          }
          $out[] = '<info>Usage:</info>';
          $out[] = $this->_generateUsage();
          $out[] = '';
          $subcommands = $parser->subcommands();
          if (!empty($subcommands)) {
              $out[] = '<info>Subcommands:</info>';
              $out[] = '';
              $max = $this->_getMaxLength($subcommands) + 2;
              foreach ($subcommands as $command) {
                  $out[] = Text::wrapBlock($command->help($max), [
                      'width' => $width,
                      'indent' => str_repeat(' ', $max),
                      'indentAt' => 1
                  ]);
              }
              $out[] = '';
              $out[] = sprintf('To see help on a subcommand use <info>`' . $this->_alias . ' %s [subcommand] --help`</info>', $parser->getCommand());
              $out[] = '';
          }
  
          $options = $parser->options();
          if (!empty($options)) {
              $max = $this->_getMaxLength($options) + 8;
              $out[] = '<info>Options:</info>';
              $out[] = '';
              foreach ($options as $option) {
                  $out[] = Text::wrapBlock($option->help($max), [
                      'width' => $width,
                      'indent' => str_repeat(' ', $max),
                      'indentAt' => 1
                  ]);
              }
              $out[] = '';
          }
  
          $arguments = $parser->arguments();
          if (!empty($arguments)) {
              $max = $this->_getMaxLength($arguments) + 2;
              $out[] = '<info>Arguments:</info>';
              $out[] = '';
              foreach ($arguments as $argument) {
                  $out[] = Text::wrapBlock($argument->help($max), [
                      'width' => $width,
                      'indent' => str_repeat(' ', $max),
                      'indentAt' => 1
                  ]);
              }
              $out[] = '';
          }
          $epilog = $parser->getEpilog();
          if (!empty($epilog)) {
              $out[] = Text::wrap($epilog, $width);
              $out[] = '';
          }
  
          return implode("\n", $out);
      }
code_tokens: public function text ( $ width = 72 ) { $ parser = $ this -> _parser ; $ out = [ ] ; $ description = $ parser -> getDescription ( ) ; if ( ! empty ( $ description ) ) { $ out [ ] = Text :: wrap ( $ description , $ width ) ; $ out [ ] = '' ; } $ out [ ] = '<info>Usage:</info>' ; $ out [ ] = $ this -> _generateUsage ( ) ; $ out [ ] = '' ; $ subcommands = $ parser -> subcommands ( ) ; if ( ! empty ( $ subcommands ) ) { $ out [ ] = '<info>Subcommands:</info>' ; $ out [ ] = '' ; $ max = $ this -> _getMaxLength ( $ subcommands ) + 2 ; foreach ( $ subcommands as $ command ) { $ out [ ] = Text :: wrapBlock ( $ command -> help ( $ max ) , [ 'width' => $ width , 'indent' => str_repeat ( ' ' , $ max ) , 'indentAt' => 1 ] ) ; } $ out [ ] = '' ; $ out [ ] = sprintf ( 'To see help on a subcommand use <info>`' . $ this -> _alias . ' %s [subcommand] --help`</info>' , $ parser -> getCommand ( ) ) ; $ out [ ] = '' ; } $ options = $ parser -> options ( ) ; if ( ! empty ( $ options ) ) { $ max = $ this -> _getMaxLength ( $ options ) + 8 ; $ out [ ] = '<info>Options:</info>' ; $ out [ ] = '' ; foreach ( $ options as $ option ) { $ out [ ] = Text :: wrapBlock ( $ option -> help ( $ max ) , [ 'width' => $ width , 'indent' => str_repeat ( ' ' , $ max ) , 'indentAt' => 1 ] ) ; } $ out [ ] = '' ; } $ arguments = $ parser -> arguments ( ) ; if ( ! empty ( $ arguments ) ) { $ max = $ this -> _getMaxLength ( $ arguments ) + 2 ; $ out [ ] = '<info>Arguments:</info>' ; $ out [ ] = '' ; foreach ( $ arguments as $ argument ) { $ out [ ] = Text :: wrapBlock ( $ argument -> help ( $ max ) , [ 'width' => $ width , 'indent' => str_repeat ( ' ' , $ max ) , 'indentAt' => 1 ] ) ; } $ out [ ] = '' ; } $ epilog = $ parser -> getEpilog ( ) ; if ( ! empty ( $ epilog ) ) { $ out [ ] = Text :: wrap ( $ epilog , $ width ) ; $ out [ ] = '' ; } return implode ( "\n" , $ out ) ; }
docstring: Get the help as formatted text suitable for output on the command line.
  
  @param int $width The width of the help output.
  @return string
docstring_tokens: Get the help as formatted text suitable for output on the command line .