public function can_reply_to_post(stdClass $user, discussion_entity $discussion, post_entity $post) : bool {
        if ($post->is_private_reply()) {
            // It is not possible to reply to a private reply.
            return false;
        }

        return $this->can_post_in_discussion($user, $discussion);
    }
public function can_reply_to_post(stdClass $user, discussion_entity $discussion, post_entity $post) : bool {
        if ($post->is_private_reply()) {
            // It is not possible to reply to a private reply.
            return false;
        }

        return $this->can_post_in_discussion($user, $discussion);
    }
public function can_reply_to_post ( stdClass $ user , discussion_entity $ discussion , post_entity $ post ) : bool { if ( $ post -> is_private_reply ( ) ) { // It is not possible to reply to a private reply. return false ; } return $ this -> can_post_in_discussion ( $ user , $ discussion ) ; }
Can the user reply to the post in this discussion?

@param stdClass $user The user to check
@param discussion_entity $discussion The discussion to check
@param post_entity $post The post the user wants to reply to
@return bool
Can the user reply to the post in this discussion?