DoS translate to Dos preventing Container::underscore => do_s_.

{@inheritdoc}
332434
public function getAlias()
    {
        $className = get_class($this);

        if (substr($className, -9) != 'Extension') {
            throw new BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getAlias() method.');
        }

        return AbstractResourceBundle::expectedAlias(substr(strrchr($className, '\\'), 1, -9));
    }
12568
def to_underscore(s):
    
    return re.sub(
            r'(?!^)([A-Z]+)',
            lambda m: "_{0}".format(m.group(1).lower()),
            re.sub(r'(?!^)([A-Z]{1}[a-z]{1})', lambda m: "_{0}".format(m.group(1).lower()), s)
        ).lower()
959783
public function dasherize($underscoredWord)
    {
        if ($result = $this->getCache($underscoredWord, 'dasherize')) {
            return $result;
        }

        $result = str_replace('_', '-', $this->underscore($underscoredWord));
        return $this->setCache($underscoredWord, 'dasherize', $result);
    }
935852
private function quoteApplicationVersion($s) {
	    $quotedString = $this->collapseWhitespace($s);
	    $quotedString = preg_replace('/\\\\/', '\\\\\\\\', $quotedString);
	    $quotedString = preg_replace('/\\(/', '\\(', $quotedString);
	
	    return $quotedString;
    }
1167287
def add_underscore_to(file)
      f = Pathname.new(file)
      if f.basename.to_s =~ /^_/
        file
      else
        "#{f.dirname}/_#{f.basename}"
      end
    end
750986
private function underscore($name)
    {
        $result = preg_replace('/([A-Z]|[0-9]+)/', "_$1", $name);
        $result = trim($result, '_');
        $result = strtolower($result);
        
        return $result;
    }
555639
def normalize_underscore_case(name):
    
    normalized = name.lower()
    normalized = re.sub(r'_(\w)',
                        lambda match: ' ' + match.group(1).upper(),
                        normalized)
    return normalized[0].upper() + normalized[1:]
636840
Rule Dorian() {
		return Sequence(IgnoreCase("dor"),
			Optional(Sequence(IgnoreCase("i"),
				Optional(Sequence(IgnoreCase("a"),
					Optional(IgnoreCase("n"))
				))
			))
		).label(Dorian).suppressSubnodes();
	}
801723
protected function underscore($name)
    {
        if (isset(self::$underscoreCache[$name])) {
            return self::$underscoreCache[$name];
        }
        $result                       = strtolower(preg_replace('/(.)([A-Z])/', "$1_$2", $name));
        self::$underscoreCache[$name] = $result;

        return $result;
    }
681393
public static function strict($s)
	{
		if (! ReflectionTypeHint::isValid()) return false;
		if (is_null($s)) return $s;
		return preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F]+/sSX', '', $s);
	}
127544
protected static function _doShortcode($m)
    {
        // allow {{foo}} syntax for escaping a tag
        if ($m[1] == '{' && $m[6] == '}') {
            return substr($m[0], 1, -1);
        }

        $tag = $m[2];
        $atts = static::_parseAttributes($m[3]);
        $listeners = EventDispatcher::instance('Shortcode')
            ->eventManager()
            ->listeners($tag);

        if (!empty($listeners)) {
            $options = [
                'atts' => (array)$atts,
                'content' => null,
                'tag' => $tag
            ];

            if (isset($m[5])) {
                $options['content'] = $m[5];
            }

            $result = EventDispatcher::instance('Shortcode')
                ->triggerArray([$tag, static::cache('context')], $options)
                ->result;

            return $m[1] . $result . $m[6];
        }

        return '';
    }
939239
function() {
    this._super.apply(this, arguments);
    this._transpilerCache = {};
    this.toFormat = esperanto[formatToFunctionName[this.format]];

    if (this.format === 'umd' && !this.bundleOptions) {
      throw new Error(umdMesssage);
    }
  }
168976
public static function toDb($data) {

        $d = static::toInt($data);

        $d .= '';

        $minus = false;
        if (strlen($d) && $d[0] === '-') {
            $minus = true;
        }

        $d = trim($d, '-');

        $d = str_pad($d, 2, '0', STR_PAD_LEFT);

        $one = substr($d, 0, -2);

        $one = str_pad($one, 1, '0');

        $two = substr($d, -2);

        $two = str_pad($two, 2, '0', STR_PAD_RIGHT);

        return ($minus ? '-' : '') . "$one.$two";
    }
477216
private static function convertUnderscoreToUcFirst($varNameLikeSnake){
        $arr = explode('_',$varNameLikeSnake);
        foreach($arr as $idx => $ele){
            $arr[$idx] = ucfirst($ele);
        }

        $res = implode('',$arr);
        return $res;
    }
865544
def underscore(str)
      call_or_yield str do
        str.to_s.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
          gsub(/([a-z\d])([A-Z])/,'\1_\2').tr("-", "_").downcase
      end
    end
409446
def method_missing(name, *args)
      if name.to_s == "#{model_name.underscore}_params"
        return params.reject{|k,v| %w(splat captures id updated_at created_at).include? k}
      end
    end
1250905
private static function _stack($matches = false)
    {
        static $safe_blocks = [];
        if ($matches !== false) {
            $key = '<' . count($safe_blocks) . '>';
            $safe_blocks[$key] = $matches[0];
            return $key;
        } else {
            $tmp = $safe_blocks;
            unset($safe_blocks);
            return $tmp;
        }
    }