Unverified Commit e125ce28 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3222769 by bbrala, alexpott, longwave, Matroskeen: [November 8, 2021]...

Issue #3222769 by bbrala, alexpott, longwave, Matroskeen: [November 8, 2021] Replace all list (array destructuring) assignment to the array syntax

(cherry picked from commit 6d39cdee)
parent f436f7c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ protected function findTokens($message) {
    }
    $tokens = [];
    foreach ($matches as $matchSet) {
      list($sourceText, $key) = $matchSet;
      [$sourceText, $key] = $matchSet;
      $tokens[$sourceText] = $key;
    }
    return $tokens;
+4 −4
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ function _batch_needs_update($new_value = NULL) {
 */
function _batch_do() {
  // Perform actual processing.
  list($percentage, $message, $label) = _batch_process();
  [$percentage, $message, $label] = _batch_process();

  return new JsonResponse(['status' => TRUE, 'percentage' => $percentage, 'message' => $message, 'label' => $label]);
}
@@ -179,11 +179,11 @@ function _batch_progress_page() {
    // Just use the content of the response.
    $fallback = $response->getContent();

    list($fallback) = explode('<!--partial-->', $fallback);
    [$fallback] = explode('<!--partial-->', $fallback);
    print $fallback;

    // Perform actual processing.
    list($percentage, $message, $label) = _batch_process($batch);
    [$percentage, $message, $label] = _batch_process($batch);
    if ($percentage == 100) {
      $new_op = 'finished';
    }
@@ -283,7 +283,7 @@ function _batch_process() {
    $finished = 1;

    if ($item = $queue->claimItem()) {
      list($callback, $args) = $item->data;
      [$callback, $args] = $item->data;

      // Build the 'context' array and execute the function call.
      $batch_context = [
+1 −1
Original line number Diff line number Diff line
@@ -418,7 +418,7 @@ function drupal_valid_test_ua($new_prefix = NULL) {
  $http_user_agent = $_SERVER['HTTP_USER_AGENT'] ?? NULL;
  $user_agent = $_COOKIE['SIMPLETEST_USER_AGENT'] ?? $http_user_agent;
  if (isset($user_agent) && preg_match("/^simple(\w+\d+):(.+):(.+):(.+)$/", $user_agent, $matches)) {
    list(, $prefix, $time, $salt, $hmac) = $matches;
    [, $prefix, $time, $salt, $hmac] = $matches;
    $check_string = $prefix . ':' . $time . ':' . $salt;
    // Read the hash salt prepared by drupal_generate_test_ua().
    // This function is called before settings.php is read and Drupal's error
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ function drupal_error_levels() {
function _drupal_error_handler_real($error_level, $message, $filename, $line) {
  if ($error_level & error_reporting()) {
    $types = drupal_error_levels();
    list($severity_msg, $severity_level) = $types[$error_level];
    [$severity_msg, $severity_level] = $types[$error_level];
    $backtrace = debug_backtrace();
    $caller = Error::getLastCaller($backtrace);

+1 −1
Original line number Diff line number Diff line
@@ -282,7 +282,7 @@ function drupal_rewrite_settings($settings = [], $settings_file = NULL) {
    $state = 'default';
    foreach (token_get_all($contents) as $token) {
      if (is_array($token)) {
        list($type, $value) = $token;
        [$type, $value] = $token;
      }
      else {
        $type = -1;
Loading