Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Oct 30, 2019
2 parents 62f5001 + 32d11c7 commit 216455e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
Expand Up @@ -88,6 +88,7 @@ public function process(File $phpcsFile, $stackPtr)
$name = trim($name);
$name = str_replace("\n", ' ', $name);
$name = preg_replace('|[\s]+|', ' ', $name);
$name = preg_replace('|\s*/\*.*\*/\s*|', '', $name);
$name = str_replace(', ', ',', $name);

$names = explode(',', $name);
Expand Down
30 changes: 30 additions & 0 deletions src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.css
Expand Up @@ -71,3 +71,33 @@

.foo /* any comment */
{ color: red; }

/* print comment */
@media print {
/* any comment */
td {
}

/* any comment */
img {
}

/* any comment */
td {
}
}

@media handheld /* handheld comment */
{
td /* any comment */
{
}

img /* any comment */
{
}

td /* any comment */
{
}
}
Expand Up @@ -26,9 +26,11 @@ class DuplicateClassDefinitionUnitTest extends AbstractSniffUnitTest
public function getErrorList()
{
return [
9 => 1,
29 => 1,
57 => 1,
9 => 1,
29 => 1,
57 => 1,
86 => 1,
101 => 1,
];

}//end getErrorList()
Expand Down

0 comments on commit 216455e

Please sign in to comment.