original_string: public function is_valid($mark_as_used=true) {
  	if (!empty($this->data['used'])) {
  		return false;
  	}
  	if (time() > $this->data['expire_at']) {
  		return false;
  	}
  	
  	if ($mark_as_used) {
  		$this->mark_as_used();
  	}
  	
  	return true;
  }
code: public function is_valid($mark_as_used=true) {
  	if (!empty($this->data['used'])) {
  		return false;
  	}
  	if (time() > $this->data['expire_at']) {
  		return false;
  	}
  	
  	if ($mark_as_used) {
  		$this->mark_as_used();
  	}
  	
  	return true;
  }
code_tokens: public function is_valid ( $ mark_as_used = true ) { if ( ! empty ( $ this -> data [ 'used' ] ) ) { return false ; } if ( time ( ) > $ this -> data [ 'expire_at' ] ) { return false ; } if ( $ mark_as_used ) { $ this -> mark_as_used ( ) ; } return true ; }
docstring: check if the token is still valid
  also marks the token as used to prevent more people getting in
  
  @param  boolean $mark_as_used set to false to validate w/o user action
  @return boolean
docstring_tokens: check if the token is still valid also marks the token as used to prevent more people getting in