You are here

protected function ReversibleConfigDiffer::normalize in Update helper 2.x

Same name and namespace in other branches
  1. 8 src/ReversibleConfigDiffer.php \Drupal\update_helper\ReversibleConfigDiffer::normalize()

File

src/ReversibleConfigDiffer.php, line 70

Class

ReversibleConfigDiffer
Overwrite of config updater differ.

Namespace

Drupal\update_helper

Code

protected function normalize($config) {

  // Recursively normalize remaining elements, if they are arrays.
  foreach ($config as $key => $value) {
    if (is_array($value)) {
      $config[$key] = $this
        ->normalize($value);
    }
  }

  // Sort and return.
  ksort($config);
  return $config;
}