Code Duplication    Length = 10-11 lines in 2 locations

src/LesserPhp/Parser.php 2 locations

@@ 1079-1089 (lines=11) @@
1076
1077
    // consume a list of tags
1078
    // this accepts a hanging delimiter
1079
    protected function tags(&$tags, $simple = false, $delim = ',')
1080
    {
1081
        $tags = [];
1082
        while ($this->tag($tt, $simple)) {
1083
            $tags[] = $tt;
1084
            if (!$this->literal($delim)) {
1085
                break;
1086
            }
1087
        }
1088
        return count($tags) !== 0;
1089
    }
1090
1091
    // list of tags of specifying mixin path
1092
    // optionally separated by > (lazy, accepts extra >)
@@ 1093-1102 (lines=10) @@
1090
1091
    // list of tags of specifying mixin path
1092
    // optionally separated by > (lazy, accepts extra >)
1093
    protected function mixinTags(&$tags)
1094
    {
1095
        $tags = [];
1096
        while ($this->tag($tt, true)) {
1097
            $tags[] = $tt;
1098
            $this->literal(">");
1099
        }
1100
1101
        return count($tags) !== 0;
1102
    }
1103
1104
    // a bracketed value (contained within in a tag definition)
1105
    protected function tagBracket(&$parts, &$hasExpression)