PhpParser\PrettyPrinter\Standard::containsEndLabel PHP Method

containsEndLabel() protected method

protected containsEndLabel ( $string, $label, $atStart = true, $atEnd = true )
    protected function containsEndLabel($string, $label, $atStart = true, $atEnd = true) {
        $start = $atStart ? '(?:^|[\r\n])' : '[\r\n]';
        $end = $atEnd ? '(?:$|[;\r\n])' : '[;\r\n]';
        return false !== strpos($string, $label)
            && preg_match('/' . $start . $label . $end . '/', $string);
    }
Standard