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() {