original_string: public static function endsWith($string, $substrings)
      {
          if (is_array($substrings)) {
              foreach ((array) $substrings as $substring) {
                  if ((string) $substring === static::subString($string, -static::length($substring))) {
                      return true;
                  }
              }
          } elseif (is_string($substrings)) {
              if ((string) $substring === static::subString($string, -static::length($substring))) {
                  return true;
              }
          }
  
          return false;
      }
code: public static function endsWith($string, $substrings)
      {
          if (is_array($substrings)) {
              foreach ((array) $substrings as $substring) {
                  if ((string) $substring === static::subString($string, -static::length($substring))) {
                      return true;
                  }
              }
          } elseif (is_string($substrings)) {
              if ((string) $substring === static::subString($string, -static::length($substring))) {
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public static function endsWith ( $ string , $ substrings ) { if ( is_array ( $ substrings ) ) { foreach ( ( array ) $ substrings as $ substring ) { if ( ( string ) $ substring === static :: subString ( $ string , - static :: length ( $ substring ) ) ) { return true ; } } } elseif ( is_string ( $ substrings ) ) { if ( ( string ) $ substring === static :: subString ( $ string , - static :: length ( $ substring ) ) ) { return true ; } } return false ; }
docstring: Check ifstring ends with another string of collection of strings.
  
  @param string       $string
  @param string|array $substring
  
  @return bool
docstring_tokens: Check ifstring ends with another string of collection of strings .