Skip to content

Commit

Permalink
Changelog + unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Mar 21, 2013
1 parent 85ced4e commit a7e5597
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
Abstract Class MyClass Extends MyClass {} Abstract Class MyClass Extends MyClass {}
Final Class MyClass Implements MyInterface {} Final Class MyClass Implements MyInterface {}
Interface MyInterface {} Interface MyInterface {}
Trait MyTrait {}


class MyClass class MyClass
{ {
Var $myVar = null; Var $myVar = null;
Const myConst = true; Const myConst = true;
} }
?> ?>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -42,13 +42,20 @@ class Squiz_Tests_Classes_LowercaseClassKeywordsUnitTest extends AbstractSniffUn
*/ */
public function getErrorList() public function getErrorList()
{ {
return array( $errors = array(
2 => 3, 2 => 3,
3 => 3, 3 => 3,
4 => 1, 4 => 1,
8 => 1, 9 => 1,
9 => 1, 10 => 1,
); );

// The trait test will only work in PHP versions where traits exist.
if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
$errors[5] = 1;
}

return $errors;


}//end getErrorList() }//end getErrorList()


Expand Down
2 changes: 2 additions & 0 deletions package.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
- Generic ScopeIndentSniff now has a setting to specify a list of tokens that should be ignored - Generic ScopeIndentSniff now has a setting to specify a list of tokens that should be ignored
-- The first token on the line is checked and the whole line is ignored if the token is in the array -- The first token on the line is checked and the whole line is ignored if the token is in the array
-- Thanks to Eloy Lafuente for the patch -- Thanks to Eloy Lafuente for the patch
- Squiz LowercaseClassKeywordsSniff now checks for the TRAIT keyword
-- Thanks to Anthon Pang for the patch
- If you create your own PHP_CodeSniffer object, PHPCS will no longer exit when an unknown argument is found - If you create your own PHP_CodeSniffer object, PHPCS will no longer exit when an unknown argument is found
-- This allows you to create wrapper scripts for PHPCS more easily -- This allows you to create wrapper scripts for PHPCS more easily
- PSR2 MethodDeclarationSniff no longer generates a notice for methods named "_" - PSR2 MethodDeclarationSniff no longer generates a notice for methods named "_"
Expand Down

0 comments on commit a7e5597

Please sign in to comment.