private static function parseOneTemplateLine($line)
    {
        $line = trim($line);

        if (!$line) {
            return [];
        }

        $regex = '#\{\{(.*?)\}\}#';

        preg_match_all($regex, $line, $matches);

        $matched = array_map(function ($v) {
            return trim($v, '\'"{}');
        }, $matches[1]);

        return $matched;
    }
private static function parseOneTemplateLine($line)
    {
        $line = trim($line);

        if (!$line) {
            return [];
        }

        $regex = '#\{\{(.*?)\}\}#';

        preg_match_all($regex, $line, $matches);

        $matched = array_map(function ($v) {
            return trim($v, '\'"{}');
        }, $matches[1]);

        return $matched;
    }
private static function parseOneTemplateLine ( $ line ) { $ line = trim ( $ line ) ; if ( ! $ line ) { return [ ] ; } $ regex = '#\{\{(.*?)\}\}#' ; preg_match_all ( $ regex , $ line , $ matches ) ; $ matched = array_map ( function ( $ v ) { return trim ( $ v , '\'"{}' ) ; } , $ matches [ 1 ] ) ; return $ matched ; }
Match JS expressions in a template line

@param string $line
@return string[]
Match JS expressions in a template line