1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-11-30 04:19:30 +01:00

Fix public modifier check for ClassMethod node

This commit is contained in:
Lisachenko Alexander 2015-07-05 20:02:43 +03:00 committed by Nikita Popov
parent 5e6627c895
commit 0fbb5f90a1

View File

@ -75,7 +75,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike
}
public function isPublic() {
return ($this->type & Class_::MODIFIER_PUBLIC) !== 0 || $this->type === 0;
return ($this->type & Class_::MODIFIER_PUBLIC) !== 0 || (!$this->isPrivate() && !$this->isProtected());
}
public function isProtected() {