Devise\Support\Str::closetag PHP Method

closetag() protected method

Gets the closing tag for a string
protected closetag ( string $str ) : char
$str string
return char
    protected function closetag($str)
    {
        $str = ltrim($str);
        $closetag = substr($str, 0, 1);
        if ($closetag == '(') {
            $closetag = ')';
        }
        if ($closetag == '[') {
            $closetag = ']';
        }
        if ($closetag == '{') {
            $closetag = '}';
        }
        if ($closetag == '<') {
            $closetag = '>';
        }
        return $closetag;
    }