original_string: protected function replaceContext($message, string $key, $context)
      {
          $strContext = '';
          if (is_object($context)) {
              if (method_exists($context, '__toString')) {
                  $strContext = call_user_func([$context, '__toString']);
              } else {
                  $strContext = var_export($context, true);
              }
          } else {
              $strContext = $context;
          }
  
          return str_replace('{'.$key.'}', $strContext, $message);
      }
code: protected function replaceContext($message, string $key, $context)
      {
          $strContext = '';
          if (is_object($context)) {
              if (method_exists($context, '__toString')) {
                  $strContext = call_user_func([$context, '__toString']);
              } else {
                  $strContext = var_export($context, true);
              }
          } else {
              $strContext = $context;
          }
  
          return str_replace('{'.$key.'}', $strContext, $message);
      }
code_tokens: protected function replaceContext ( $ message , string $ key , $ context ) { $ strContext = '' ; if ( is_object ( $ context ) ) { if ( method_exists ( $ context , '__toString' ) ) { $ strContext = call_user_func ( [ $ context , '__toString' ] ) ; } else { $ strContext = var_export ( $ context , true ) ; } } else { $ strContext = $ context ; } return str_replace ( '{' . $ key . '}' , $ strContext , $ message ) ; }
docstring: Replace context pattern in the message with related context.
  
  @param string $message Log message
  @param string $key     Context pattern to be replaced
  @param mixed  $context Related context to replace $key
  
  @return string $message with pattern '{$key}' replaced by $context
docstring_tokens: Replace context pattern in the message with related context .