original_string: public function get_edit_post_url_from_post(forum_entity $forum, post_entity $post) : moodle_url {
          if ($forum->get_type() == 'single') {
              return new moodle_url('/course/modedit.php', [
                  'update' => $forum->get_course_module_record()->id,
                  'sesskey' => sesskey(),
                  'return' => 1
              ]);
          } else {
              return new moodle_url('/mod/forum/post.php', [
                  'edit' => $post->get_id()
              ]);
          }
      }
code: public function get_edit_post_url_from_post(forum_entity $forum, post_entity $post) : moodle_url {
          if ($forum->get_type() == 'single') {
              return new moodle_url('/course/modedit.php', [
                  'update' => $forum->get_course_module_record()->id,
                  'sesskey' => sesskey(),
                  'return' => 1
              ]);
          } else {
              return new moodle_url('/mod/forum/post.php', [
                  'edit' => $post->get_id()
              ]);
          }
      }
code_tokens: public function get_edit_post_url_from_post ( forum_entity $ forum , post_entity $ post ) : moodle_url { if ( $ forum -> get_type ( ) == 'single' ) { return new moodle_url ( '/course/modedit.php' , [ 'update' => $ forum -> get_course_module_record ( ) -> id , 'sesskey' => sesskey ( ) , 'return' => 1 ] ) ; } else { return new moodle_url ( '/mod/forum/post.php' , [ 'edit' => $ post -> get_id ( ) ] ) ; } }
docstring: Get the url to edit a post.
  
  @param forum_entity $forum The forum the post belongs to
  @param post_entity $post The post
  @return moodle_url
docstring_tokens: Get the url to edit a post .