original_string: public function add(string $name, callable $callback): self
      {
          if ($this->exists($name)) {
              throw new LogicException(
                  'The helper function name "' . $name . '" is already registered.'
              );
          }
  
          $this->helpers[$name] = $callback;
  
          return $this;
      }
code: public function add(string $name, callable $callback): self
      {
          if ($this->exists($name)) {
              throw new LogicException(
                  'The helper function name "' . $name . '" is already registered.'
              );
          }
  
          $this->helpers[$name] = $callback;
  
          return $this;
      }
code_tokens: public function add ( string $ name , callable $ callback ) : self { if ( $ this -> exists ( $ name ) ) { throw new LogicException ( 'The helper function name "' . $ name . '" is already registered.' ) ; } $ this -> helpers [ $ name ] = $ callback ; return $ this ; }
docstring: Add a new template function.
  @param  string $name
  @param  callback $callback
  @return ViewHelpers
docstring_tokens: Add a new template function .