/**
  * Alter the DOM document per the command object
  * @param Command $command
  * @param \DomDocument $dom
  * @return \DomDocument
  */
 private static function alterHelpDocument(Command $command, \DomDocument $dom)
 {
     if ($command instanceof HelpDocumentAlter) {
         $dom = $command->helpAlter($dom);
     }
     return $dom;
 }