alexia\mar\tests\critical::_variableInterpolation PHP Method

_variableInterpolation() public method

Find cases of "$$variable" that need curly braces added.
public _variableInterpolation ( $line ) : boolean
return boolean Line matches test.
    public function _variableInterpolation($line)
    {
        $regex = "#(((::|->)\\\$[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)+\\[[^\\s]+\\]\\()|(->\\\$[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*\\[)|(\\\$\\\$[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*\\[)|(^\\s*?global.*?\\\$\\\$[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)#i";
        //@LawnGnome's regex from Twitter; modified and extended to support global simple variable change.
        if (preg_match($regex, $line)) {
            return true;
        }
        return false;
    }