Code Duplication    Length = 10-10 lines in 2 locations

src/Parser/Sheet.php 1 location

@@ 120-129 (lines=10) @@
117
		return ($a->depth < $b->depth) ? -1 : 1;
118
	}
119
120
	private function stripComments($str, $open, $close) {
121
		$pos = 0;
122
		while (($pos = strpos($str, $open, $pos)) !== false) {
123
			$end = strpos($str, $close, $pos);
124
			if ($end === false) break;
125
			$str = substr_replace($str, '', $pos, $end-$pos+strlen($close));
126
		}
127
128
		return $str;
129
	}
130
131
	private function getProperties($tokens) {
132
        $rules = $tokens->splitOnToken(Tokenizer::SEMI_COLON);

src/TSSValidator.php 1 location

@@ 54-63 (lines=10) @@
51
		return $tokenizer->getTokens();
52
    }
53
54
    private function stripComments($str, $open, $close) {
55
		$pos = 0;
56
		while (($pos = strpos($str, $open, $pos)) !== false) {
57
			$end = strpos($str, $close, $pos);
58
			if ($end === false) break;
59
			$str = substr_replace($str, '', $pos, $end-$pos+strlen($close));
60
		}
61
62
		return $str;
63
	}
64
}
65