Code Duplication    Length = 7-7 lines in 2 locations

lib/post.php 2 locations

@@ 274-280 (lines=7) @@
271
     *
272
     * @return string
273
     */
274
    public function github_view_url() {
275
        $github_path = get_post_meta( $this->id, '_wogh_github_path', true );
276
        $repository = $this->api->fetch()->repository();
277
        $branch = $this->api->fetch()->branch();
278
279
        return "https://github.com/$repository/blob/$branch/$github_path";
280
    }
281
282
    /**
283
     * Returns the URL for the post on GitHub.
@@ 287-293 (lines=7) @@
284
     *
285
     * @return string
286
     */
287
    public function github_edit_url() {
288
        $github_path = get_post_meta( $this->id, '_wogh_github_path', true );
289
        $repository = $this->api->fetch()->repository();
290
        $branch = $this->api->fetch()->branch();
291
292
        return "https://github.com/$repository/edit/$branch/$github_path";
293
    }
294
295
    /**
296
     * Retrieve post type directory from blob path.