Code Duplication    Length = 3-3 lines in 2 locations

json-endpoints/class.wpcom-json-api-publicize-endpoint.php 2 locations

@@ 117-119 (lines=3) @@
114
		$connection = WPCOM_JSON_API_Get_Connection_Endpoint::get_connection_by_id( $connection_id );
115
116
		// Verify that user has permission to view this connection
117
		if ( $current_user->ID != $connection['user_ID'] && 0 != $connection['user_ID'] ) {
118
			return new WP_Error( 'authorization_required', 'You do not have permission to access this resource.', 403 );
119
		}
120
121
		if ( empty( $connection ) ) {
122
			return new WP_Error( 'unknown_connection', 'Connection not found.', 404 );
@@ 155-157 (lines=3) @@
152
		}
153
154
		// Verify that user has permission to view this connection
155
		if ( $current_user->ID != $connection['user_ID'] && 0 != $connection['user_ID'] ) {
156
			return new WP_Error( 'authorization_required', 'You do not have permission to access this resource.', 403 );
157
		}
158
159
		// Remove publicize connections related to the connection
160
		$publicize = new Publicize();