Code Duplication    Length = 9-9 lines in 2 locations

helpers.php 2 locations

@@ 76-84 (lines=9) @@
73
	$output = '';
74
75
	switch ( $target ) {
76
		case 'view': {
77
			$getter = get_the_github_view_url();
78
			if ( ! empty( $text ) ) {
79
				$linktext = $text;
80
			} else {
81
				$linktext = __( 'View this post on GitHub', 'wp-github-sync' );
82
			}
83
			break;
84
		}
85
		case 'edit': {
86
			$getter = get_the_github_edit_url();
87
			if ( ! empty( $text ) ) {
@@ 85-93 (lines=9) @@
82
			}
83
			break;
84
		}
85
		case 'edit': {
86
			$getter = get_the_github_edit_url();
87
			if ( ! empty( $text ) ) {
88
				$linktext = $text;
89
			} else {
90
				$linktext = __( 'Edit this post on GitHub', 'wp-github-sync' );
91
			}
92
			break;
93
		}
94
		default: {
95
			$getter = get_the_github_view_url();
96
			$linktext = __( 'View this post on GitHub', 'wp-github-sync' );