original_string: protected function getWildcardCustomMessages($messages, $search, $default)
      {
          foreach ($messages as $key => $message) {
              if ($search === $key || (Str::contains($key, ['*']) && Str::is($key, $search))) {
                  return $message;
              }
          }
  
          return $default;
      }
code: protected function getWildcardCustomMessages($messages, $search, $default)
      {
          foreach ($messages as $key => $message) {
              if ($search === $key || (Str::contains($key, ['*']) && Str::is($key, $search))) {
                  return $message;
              }
          }
  
          return $default;
      }
code_tokens: protected function getWildcardCustomMessages ( $ messages , $ search , $ default ) { foreach ( $ messages as $ key => $ message ) { if ( $ search === $ key || ( Str :: contains ( $ key , [ '*' ] ) && Str :: is ( $ key , $ search ) ) ) { return $ message ; } } return $ default ; }
docstring: Check the given messages for a wildcard key.
  
  @param  array  $messages
  @param  string  $search
  @param  string  $default
  @return string
docstring_tokens: Check the given messages for a wildcard key .