original_string: public function addRule($name, callable $rule)
      {
          if (isset($this[self::rule($name)])) {
              throw new \RuntimeException("rule '$name' already exists'");
          }
          $this[self::rule($name)] = $this->protect($rule);
      }
code: public function addRule($name, callable $rule)
      {
          if (isset($this[self::rule($name)])) {
              throw new \RuntimeException("rule '$name' already exists'");
          }
          $this[self::rule($name)] = $this->protect($rule);
      }
code_tokens: public function addRule ( $ name , callable $ rule ) { if ( isset ( $ this [ self :: rule ( $ name ) ] ) ) { throw new \ RuntimeException ( "rule '$name' already exists'" ) ; } $ this [ self :: rule ( $ name ) ] = $ this -> protect ( $ rule ) ; }
docstring: Add an augmentation rule.
  
  @param string $name the name of the augmentation rule
  @param callable $rule the code that will be executed
  @throws \RuntimeException
docstring_tokens: Add an augmentation rule .