Code Duplication    Length = 3-5 lines in 2 locations

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

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