src/ATPCore/Lessc.php
protected function deduplicate($lines) {
$unique = array();
$comments = array();

foreach($lines as $line) {
if (strpos($line, '/*') === 0) {
$comments[] = $line;
continue;
}
if (!in_array($line, $unique)) {
$unique[] = $line;
}
array_splice($unique, array_search($line, $unique), 0, $comments);
$comments = array();
}
return array_merge($unique, $comments);
}
protected function deduplicate($lines) {
$unique = array();
$comments = array();

foreach($lines as $line) {
if (strpos($line, '/*') === 0) {
$comments[] = $line;
continue;
}
if (!in_array($line, $unique)) {
$unique[] = $line;
}
array_splice($unique, array_search($line, $unique), 0, $comments);
$comments = array();
}
return array_merge($unique, $comments);
}
protected function deduplicate ( $ lines ) { $ unique = array ( ) ; $ comments = array ( ) ; foreach ( $ lines as $ line ) { if ( strpos ( $ line , '/*' ) === 0 ) { $ comments [ ] = $ line ; continue ; } if ( ! in_array ( $ line , $ unique ) ) { $ unique [ ] = $ line ; } array_splice ( $ unique , array_search ( $ line , $ unique ) , 0 , $ comments ) ; $ comments = array ( ) ; } return array_merge ( $ unique , $ comments ) ; }
Deduplicate lines in a block. Comments are not deduplicated. If a
duplicate rule is detected, the comments immediately preceding each
occurence are consolidated.
Deduplicate lines in a block . Comments are not deduplicated . If a duplicate rule is detected the comments immediately preceding each occurence are consolidated .