Code Duplication    Length = 3-5 lines in 2 locations

json-endpoints/jetpack/class.jetpack-json-api-endpoint.php 2 locations

@@ 114-116 (lines=3) @@
111
				}
112
			}
113
			// Check that must have conditions is less then
114
			if ( $passed < $must_pass ) {
115
				return new WP_Error( 'unauthorized', sprintf( __( 'This user is not authorized to %s on this blog.', 'jetpack' ), implode( ', ', $failed ), 403 ) );
116
			}
117
118
		} else {
119
			if ( !current_user_can( $capability ) ) {
@@ 118-122 (lines=5) @@
115
				return new WP_Error( 'unauthorized', sprintf( __( 'This user is not authorized to %s on this blog.', 'jetpack' ), implode( ', ', $failed ), 403 ) );
116
			}
117
118
		} else {
119
			if ( !current_user_can( $capability ) ) {
120
				return new WP_Error( 'unauthorized', sprintf( __( 'This user is not authorized to %s on this blog.', 'jetpack' ), $capability ), 403 );
121
			}
122
		}
123
124
		return true;
125
	}