Permalink
Browse files

Explaining a standard (phpcs -e) that uses namespaces now works corre…

…ctly
  • Loading branch information...
1 parent da30d91 commit 51ec16201fb60e00f77850dc8de69a04e91342be @gsherwood gsherwood committed Jun 12, 2013
Showing with 6 additions and 0 deletions.
  1. +5 −0 CodeSniffer/CLI.php
  2. +1 −0 package.xml
View
@@ -732,6 +732,11 @@ public function explainStandard($standard)
foreach ($sniffs as $sniff) {
$parts = explode('_', $sniff);
+ if (isset($parts[3]) === false) {
+ // Might be using namespaces.
+ $parts = explode('\\', $sniff);
+ }
+
if ($lastStandard === '') {
$lastStandard = $parts[0];
}
View
@@ -34,6 +34,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
-- Thanks to Maik Penz for the patch
- The JS tokenizer now correctly identifies T_INLINE_ELSE tokens instead of leaving them as T_COLON
-- Thanks to Arnout Boks for the patch
+ - Explaining a standard (phpcs -e) that uses namespaces now works correctly
- Many more docs added for Generic sniffs, as well as a few from other standards
-- Thanks to Spencer Rinehart for the contribution
- Added Generic InlineHTMLSniff to ensure a file only contains PHP code

0 comments on commit 51ec162

Please sign in to comment.