Code Duplication    Length = 4-4 lines in 2 locations

src/wp-admin/includes/ajax-actions.php 2 locations

@@ 3741-3744 (lines=4) @@
3738
		'newVersion' => '',
3739
	);
3740
3741
	if ( ! current_user_can( 'update_plugins' ) || 0 !== validate_file( $plugin ) ) {
3742
		$status['errorMessage'] = __( 'Sorry, you are not allowed to update plugins for this site.' );
3743
		wp_send_json_error( $status );
3744
	}
3745
3746
	$plugin_data          = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
3747
	$status['plugin']     = $plugin;
@@ 3842-3845 (lines=4) @@
3839
		'slug'   => sanitize_key( wp_unslash( $_POST['slug'] ) ),
3840
	);
3841
3842
	if ( ! current_user_can( 'delete_plugins' ) || 0 !== validate_file( $plugin ) ) {
3843
		$status['errorMessage'] = __( 'Sorry, you are not allowed to delete plugins for this site.' );
3844
		wp_send_json_error( $status );
3845
	}
3846
3847
	$plugin_data          = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
3848
	$status['plugin']     = $plugin;