original_string: public function addRight($name)
      {
          $rights = $this->getRights();
          if (count($rights) === 0) {
              $value = 1;
          } else {
              $value = 2 * end($rights);
          }
          $this->rights[$name] = $value;
          return $this;
      }
code: public function addRight($name)
      {
          $rights = $this->getRights();
          if (count($rights) === 0) {
              $value = 1;
          } else {
              $value = 2 * end($rights);
          }
          $this->rights[$name] = $value;
          return $this;
      }
code_tokens: public function addRight ( $ name ) { $ rights = $ this -> getRights ( ) ; if ( count ( $ rights ) === 0 ) { $ value = 1 ; } else { $ value = 2 * end ( $ rights ) ; } $ this -> rights [ $ name ] = $ value ; return $ this ; }
docstring: Add a right to the list. The correct value is calculated automatically.
  
  @param string $name
  
  @return $this
docstring_tokens: Add a right to the list . The correct value is calculated automatically .