Skip to content

Commit

Permalink
Fixed bug #19469 : PHP_CodeSniffer_File::getMemberProperties() sets w…
Browse files Browse the repository at this point in the history
…rong scope
  • Loading branch information
gsherwood committed Jun 19, 2012
1 parent a63ce6a commit 669d7ef
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 26 deletions.
2 changes: 2 additions & 0 deletions CodeSniffer/File.php
Expand Up @@ -2249,6 +2249,8 @@ public function getMemberProperties($stackPtr)
T_WHITESPACE, T_WHITESPACE,
T_COMMENT, T_COMMENT,
T_DOC_COMMENT, T_DOC_COMMENT,
T_VARIABLE,
T_COMMA,
); );


$scope = 'public'; $scope = 'public';
Expand Down
Expand Up @@ -85,4 +85,12 @@ class foo
ccc ccc
C; C;
} }

class a
{
protected
$_sheet,
$_FieldParser,
$_key;
}
?> ?>
Expand Up @@ -44,6 +44,9 @@ public function getErrorList()
12 => 1, 12 => 1,
17 => 1, 17 => 1,
22 => 1, 22 => 1,
92 => 1,
93 => 1,
94 => 1,
); );


}//end getErrorList() }//end getErrorList()
Expand Down
Expand Up @@ -99,4 +99,12 @@ $foo = <<<BAR
$123 $123
"$456" "$456"
BAR; BAR;

class a
{
protected
$_sheet,
$_FieldParser,
$_key;
}
?> ?>
Expand Up @@ -43,32 +43,35 @@ class Squiz_Tests_NamingConventions_ValidVariableNameUnitTest extends AbstractSn
public function getErrorList() public function getErrorList()
{ {
return array( return array(
3 => 1, 3 => 1,
5 => 1, 5 => 1,
10 => 1, 10 => 1,
12 => 1, 12 => 1,
15 => 1, 15 => 1,
17 => 1, 17 => 1,
20 => 1, 20 => 1,
22 => 1, 22 => 1,
25 => 1, 25 => 1,
27 => 1, 27 => 1,
31 => 1, 31 => 1,
33 => 1, 33 => 1,
36 => 1, 36 => 1,
37 => 1, 37 => 1,
39 => 1, 39 => 1,
42 => 1, 42 => 1,
44 => 1, 44 => 1,
53 => 1, 53 => 1,
58 => 1, 58 => 1,
62 => 1, 62 => 1,
63 => 1, 63 => 1,
64 => 1, 64 => 1,
67 => 1, 67 => 1,
76 => 1, 76 => 1,
78 => 1, 78 => 1,
81 => 1, 81 => 1,
106 => 1,
107 => 1,
108 => 1,
); );


}//end getErrorList() }//end getErrorList()
Expand Down
1 change: 1 addition & 0 deletions package.xml
Expand Up @@ -44,6 +44,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
- Fixed bug #19428 : PHPCS Report "hgblame" doesn't support windows paths - Fixed bug #19428 : PHPCS Report "hgblame" doesn't support windows paths
-- Thanks to Justin Rovang for the patch -- Thanks to Justin Rovang for the patch
- Fixed bug #19448 : Problem with detecting remote standards - Fixed bug #19448 : Problem with detecting remote standards
- Fixed bug #19469 : PHP_CodeSniffer_File::getMemberProperties() sets wrong scope
- Fixed bug #19471 : phpcs on Windows, when using Zend standard, doesn't catch problems - Fixed bug #19471 : phpcs on Windows, when using Zend standard, doesn't catch problems
-- Thanks to Ivan Habunek for the patch -- Thanks to Ivan Habunek for the patch
</notes> </notes>
Expand Down

0 comments on commit 669d7ef

Please sign in to comment.