original_string: public function setPosition($position, $whence)
      {
          switch ($whence) {
              case SEEK_SET:
                  $this->position    = $position;
                  break;
              case SEEK_CUR:
                  $this->position    += $position;
                  break;
              case SEEK_END:
                  $this->position    = $this->length + $position;
                  break;
              default:
                  $this->position    = 0;
                  return false;
          }
  
          if ($this->position < 0) {
              $this->position    = 0;
              return false;
          } else if ($this->position > $this->length) {
              $this->position    = $this->length;
              return false;
          } else {
              return true;
          }
      }
code: public function setPosition($position, $whence)
      {
          switch ($whence) {
              case SEEK_SET:
                  $this->position    = $position;
                  break;
              case SEEK_CUR:
                  $this->position    += $position;
                  break;
              case SEEK_END:
                  $this->position    = $this->length + $position;
                  break;
              default:
                  $this->position    = 0;
                  return false;
          }
  
          if ($this->position < 0) {
              $this->position    = 0;
              return false;
          } else if ($this->position > $this->length) {
              $this->position    = $this->length;
              return false;
          } else {
              return true;
          }
      }
code_tokens: public function setPosition ( $ position , $ whence ) { switch ( $ whence ) { case SEEK_SET : $ this -> position = $ position ; break ; case SEEK_CUR : $ this -> position += $ position ; break ; case SEEK_END : $ this -> position = $ this -> length + $ position ; break ; default : $ this -> position = 0 ; return false ; } if ( $ this -> position < 0 ) { $ this -> position = 0 ; return false ; } else if ( $ this -> position > $ this -> length ) { $ this -> position = $ this -> length ; return false ; } else { return true ; } }
docstring: Sets the pointer position
  
  @param   integer     $position   The position in bytes
  @param   integer     $whence     The reference from where to measure $position (SEEK_SET, SEEK_CUR or SEEK_END)
  @return  boolean                 True if the position could be set
docstring_tokens: Sets the pointer position