original_string: public function can_reply_privately_to_post(stdClass $user, post_entity $post) : bool {
          if ($post->is_private_reply()) {
              // You cannot reply privately to a post which is, itself, a private reply.
              return false;
          }
  
          return has_capability('mod/forum:postprivatereply', $this->get_context(), $user);
      }
code: public function can_reply_privately_to_post(stdClass $user, post_entity $post) : bool {
          if ($post->is_private_reply()) {
              // You cannot reply privately to a post which is, itself, a private reply.
              return false;
          }
  
          return has_capability('mod/forum:postprivatereply', $this->get_context(), $user);
      }
code_tokens: public function can_reply_privately_to_post ( stdClass $ user , post_entity $ post ) : bool { if ( $ post -> is_private_reply ( ) ) { // You cannot reply privately to a post which is, itself, a private reply. return false ; } return has_capability ( 'mod/forum:postprivatereply' , $ this -> get_context ( ) , $ user ) ; }
docstring: Can the user reply privately to the specified post?
  
  @param stdClass $user The user to check
  @param post_entity $post The post the user wants to reply to
  @return bool
docstring_tokens: Can the user reply privately to the specified post?