Skip to content

Commit

Permalink
Merge branch 'fix/SquizMethodScopeTrait' of https://github.com/donatj…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Aug 25, 2016
2 parents 26d3516 + 8df7fe9 commit a520b9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Squiz_Sniffs_Scope_MethodScopeSniff extends PHP_CodeSniffer_Standards_Abst
*/
public function __construct()
{
parent::__construct(array(T_CLASS, T_INTERFACE), array(T_FUNCTION));
parent::__construct(array(T_CLASS, T_INTERFACE, T_TRAIT), array(T_FUNCTION));

}//end __construct()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ class Closure_Test {
function test() {
$foo = function() { echo 'foo'; };
}

trait Trait_Test {
function func1() {}
public function func1() {}
private function func1() {}
protected function func1() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function getErrorList()
{
return array(
6 => 1,
30 => 1,
);

}//end getErrorList()
Expand Down

0 comments on commit a520b9a

Please sign in to comment.