diff --git a/core/includes/update.inc b/core/includes/update.inc index c16d0ef1c3..7bc0e6010a 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -374,7 +374,7 @@ function update_resolve_dependencies($starting_updates) { $graph_object = new Graph($graph); $graph = $graph_object->searchAndSort(); // Prepare the graph for sort. - update_prepare_graph_for_sort($graph); + _update_prepare_graph_for_sort($graph); // Finally sort the updates by weight. uasort($graph, ['Drupal\Component\Utility\SortArray', 'sortByWeightElement']); @@ -443,8 +443,10 @@ function update_resolve_dependencies($starting_updates) { * * @param array &$graph * The update graph array. + * + * @internal */ -function update_prepare_graph_for_sort(array &$graph) { +function _update_prepare_graph_for_sort(array &$graph) { $weights = []; $system_updates = []; foreach ($graph as $update_name => $update_data) { @@ -455,7 +457,7 @@ function update_prepare_graph_for_sort(array &$graph) { } } sort($weights); - $new_weights = array_combine($weights, $weights); + $new_weights = array_combine($weights, $weights); foreach ($system_updates as $system_update_weight) { foreach ($new_weights as $old_weight => &$new_weight) { if ($old_weight >= $system_update_weight) { @@ -591,7 +593,7 @@ function update_build_dependency_graph($update_functions) { // A function returning all the updates which directly or indirectly have a // specific update as an edge. - $get_all_parents = function($update) use ($graph, &$get_all_parents) { + $get_all_parents = function ($update) use ($graph, &$get_all_parents) { $parents = []; foreach ($graph as $func => $data) { if (isset($data['edges'][$update])) {