Skip to content

Commit

Permalink
Two uppercase characters can now be placed side-by-side in class name…
Browse files Browse the repository at this point in the history
…s in Squiz ValidClassNameSniff

git-svn-id: http://svn.php.net/repository/pear/packages/PHP_CodeSniffer/trunk@236198 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
gsherwood committed May 24, 2007
1 parent d5921dd commit b5c2a15
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
$name = trim($phpcsFile->getTokensAsString($nameStart, ($nameEnd - $nameStart)));

// Check for camel caps format.
$valid = PHP_CodeSniffer::isCamelCaps($name, true, true, true);
$valid = PHP_CodeSniffer::isCamelCaps($name, true, true, false);
if ($valid === false) {
$type = ucfirst($tokens[$stackPtr]['content']);
$error = "$type name \"$name\" is not in camel caps format";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ class invalid_lowercase_class_with_underscores extends MyClass {}


// All uppercase.
class INVALIDUPPERCASECLASS extends MyClass {}
class VALIDUPPERCASECLASS extends MyClass {}
class INVALID_UPPERCASE_CLASS_WITH_UNDERSCORES extends MyClass {}


// Mix camel case with uppercase.
class InvalidCamelCaseClassWithUPPERCASE extends MyClass {}
class ValidCamelCaseClassWithUPPERCASE extends MyClass {}


// Invalid usage of numeric characters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ public function getErrorList()
10 => 1,
14 => 1,
15 => 1,
19 => 1,
20 => 1,
24 => 1,
28 => 1,
29 => 1,
30 => 1,
Expand Down
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<notes>
- Fixed error where including a directory of sniffs in a coding standard class did not work
- Coding standard classes can now specify a list of sniffs to exclude as well as include (feature request #11056)
- Two uppercase characters can now be placed side-by-side in class names in Squiz ValidClassNameSniff
</notes>
<contents>
<dir name="/">
Expand Down

0 comments on commit b5c2a15

Please sign in to comment.