original_string: protected function resolveContext($key, $message, array $vars)
      {
          $context = isset($vars['_context']) ? $vars['_context'] : null;
  
          // No or missing context, fallback to the key/first message
          if ($context === null) {
              if (isset($message['_context'][''])) {
                  return $message['_context'][''] === '' ? $key : $message['_context'][''];
              }
  
              return current($message['_context']);
          }
          if (!isset($message['_context'][$context])) {
              return $key;
          }
          if ($message['_context'][$context] === '') {
              return $key;
          }
  
          return $message['_context'][$context];
      }
code: protected function resolveContext($key, $message, array $vars)
      {
          $context = isset($vars['_context']) ? $vars['_context'] : null;
  
          // No or missing context, fallback to the key/first message
          if ($context === null) {
              if (isset($message['_context'][''])) {
                  return $message['_context'][''] === '' ? $key : $message['_context'][''];
              }
  
              return current($message['_context']);
          }
          if (!isset($message['_context'][$context])) {
              return $key;
          }
          if ($message['_context'][$context] === '') {
              return $key;
          }
  
          return $message['_context'][$context];
      }
code_tokens: protected function resolveContext ( $ key , $ message , array $ vars ) { $ context = isset ( $ vars [ '_context' ] ) ? $ vars [ '_context' ] : null ; // No or missing context, fallback to the key/first message if ( $ context === null ) { if ( isset ( $ message [ '_context' ] [ '' ] ) ) { return $ message [ '_context' ] [ '' ] === '' ? $ key : $ message [ '_context' ] [ '' ] ; } return current ( $ message [ '_context' ] ) ; } if ( ! isset ( $ message [ '_context' ] [ $ context ] ) ) { return $ key ; } if ( $ message [ '_context' ] [ $ context ] === '' ) { return $ key ; } return $ message [ '_context' ] [ $ context ] ; }
docstring: Resolve a message's context structure.
  
  @param string $key The message key being handled.
  @param string|array $message The message content.
  @param array $vars The variables containing the `_context` key.
  @return string
docstring_tokens: Resolve a message s context structure .