original_string: public function can_view_post(stdClass $user, discussion_entity $discussion, post_entity $post) : bool {
          if (!$this->can_view_post_shell($user, $post)) {
              return false;
          }
  
          $forum = $this->get_forum();
          $forumrecord = $this->get_forum_record();
          $discussionrecord = $this->get_discussion_record($discussion);
          $postrecord = $this->get_post_record($post);
          $coursemodule = $forum->get_course_module_record();
          return forum_user_can_see_post($forumrecord, $discussionrecord, $postrecord, $user, $coursemodule, false);
      }
code: public function can_view_post(stdClass $user, discussion_entity $discussion, post_entity $post) : bool {
          if (!$this->can_view_post_shell($user, $post)) {
              return false;
          }
  
          $forum = $this->get_forum();
          $forumrecord = $this->get_forum_record();
          $discussionrecord = $this->get_discussion_record($discussion);
          $postrecord = $this->get_post_record($post);
          $coursemodule = $forum->get_course_module_record();
          return forum_user_can_see_post($forumrecord, $discussionrecord, $postrecord, $user, $coursemodule, false);
      }
code_tokens: public function can_view_post ( stdClass $ user , discussion_entity $ discussion , post_entity $ post ) : bool { if ( ! $ this -> can_view_post_shell ( $ user , $ post ) ) { return false ; } $ forum = $ this -> get_forum ( ) ; $ forumrecord = $ this -> get_forum_record ( ) ; $ discussionrecord = $ this -> get_discussion_record ( $ discussion ) ; $ postrecord = $ this -> get_post_record ( $ post ) ; $ coursemodule = $ forum -> get_course_module_record ( ) ; return forum_user_can_see_post ( $ forumrecord , $ discussionrecord , $ postrecord , $ user , $ coursemodule , false ) ; }
docstring: Can the user view the content of 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 view
  @return bool
docstring_tokens: Can the user view the content of the post in this discussion?