diff --git a/Symfony/Sniffs/NamingConventions/ValidClassNameSniff.php b/Symfony/Sniffs/NamingConventions/ValidClassNameSniff.php
index 8fe9131..b23b489 100644
--- a/Symfony/Sniffs/NamingConventions/ValidClassNameSniff.php
+++ b/Symfony/Sniffs/NamingConventions/ValidClassNameSniff.php
@@ -40,10 +40,7 @@ class ValidClassNameSniff implements Sniff
public function register()
{
return array(
- T_INTERFACE,
- T_TRAIT,
T_EXTENDS,
- T_ABSTRACT
);
}
@@ -63,38 +60,6 @@ public function process(File $phpcsFile, $stackPtr)
while ($tokens[$stackPtr]['line'] === $line) {
- /*
- * Suffix interfaces with Interface;
- */
- if ('T_INTERFACE' === $tokens[$stackPtr]['type']) {
- $name = $phpcsFile->findNext(T_STRING, $stackPtr);
-
- if ($name && substr($tokens[$name]['content'], -9) !== 'Interface') {
- $phpcsFile->addError(
- 'Interface name is not suffixed with "Interface"',
- $stackPtr,
- 'InvalidInterfaceName'
- );
- }
- break;
- }
-
- /*
- * Suffix traits with Trait;
- */
- if ('T_TRAIT' === $tokens[$stackPtr]['type']) {
- $name = $phpcsFile->findNext(T_STRING, $stackPtr);
-
- if ($name && substr($tokens[$name]['content'], -5) !== 'Trait') {
- $phpcsFile->addError(
- 'Trait name is not suffixed with "Trait"',
- $stackPtr,
- 'InvalidTraitName'
- );
- }
- break;
- }
-
/*
* Suffix exceptions with Exception;
*/
@@ -120,26 +85,6 @@ public function process(File $phpcsFile, $stackPtr)
}
break;
}
-
- /*
- * Prefix abstract classes with Abstract.
- */
- if ('T_ABSTRACT' === $tokens[$stackPtr]['type']) {
- $name = $phpcsFile->findNext(T_STRING, $stackPtr);
- $function = $phpcsFile->findNext(T_FUNCTION, $stackPtr);
-
- // making sure we're not dealing with an abstract function
- if ((null === $function|| $name < $function)
- && strpos($tokens[$name]['content'], 'Abstract') !== 0
- ) {
- $phpcsFile->addError(
- 'Abstract class name is not prefixed with "Abstract"',
- $stackPtr,
- 'InvalidAbstractName'
- );
- }
- break;
- }
}
}
}
diff --git a/Symfony/Tests/NamingConventions/ValidClassNameUnitTest.inc b/Symfony/Tests/NamingConventions/ValidClassNameUnitTest.inc
index b8d6588..f9b3d99 100644
--- a/Symfony/Tests/NamingConventions/ValidClassNameUnitTest.inc
+++ b/Symfony/Tests/NamingConventions/ValidClassNameUnitTest.inc
@@ -3,18 +3,3 @@
class Foo extends \Exception {}
class FooException extends \Exception {}
-
-abstract class Bar {
- function __construct() {}
-
-}
-
-abstract class AbstractBar {}
-
-trait Baz {}
-
-trait BazTrait {}
-
-interface Qux {}
-
-interface QuxInterface {}
\ No newline at end of file
diff --git a/Symfony/Tests/NamingConventions/ValidClassNameUnitTest.php b/Symfony/Tests/NamingConventions/ValidClassNameUnitTest.php
index 356e84c..2087ec9 100644
--- a/Symfony/Tests/NamingConventions/ValidClassNameUnitTest.php
+++ b/Symfony/Tests/NamingConventions/ValidClassNameUnitTest.php
@@ -44,9 +44,6 @@ public function getErrorList()
{
return array(
3 => 1,
- 7 => 1,
- 14 => 1,
- 18 => 1,
);
}
diff --git a/Symfony/ruleset.xml b/Symfony/ruleset.xml
index b302f7a..b03b5e2 100755
--- a/Symfony/ruleset.xml
+++ b/Symfony/ruleset.xml
@@ -23,6 +23,9 @@
+
+
+