Skip to content

Commit

Permalink
Check if Sniff is abstract before registering it
Browse files Browse the repository at this point in the history
  • Loading branch information
Byte-Lab committed Feb 9, 2015
1 parent d083fc0 commit 39a9f04
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CodeSniffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,12 @@ public function registerSniffs($files, $restrictions)
$className = $classNameNS;
}

// Skip abstract classes.
$reflection = new ReflectionClass($className);
if ($reflection->isAbstract() === true) {
continue;
}

$listeners[$className] = $className;

if (PHP_CODESNIFFER_VERBOSITY > 2) {
Expand Down

0 comments on commit 39a9f04

Please sign in to comment.