Merge branch '3.x'

This commit is contained in:
Nikita Popov 2017-04-19 11:20:32 +02:00
commit ba85da88a0
4 changed files with 7 additions and 5 deletions

View File

@ -35,7 +35,7 @@ class ClassConst extends Node\Stmt
*/
public function isPublic() {
return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
|| ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0;
|| ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;
}
/**

View File

@ -70,7 +70,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike
*/
public function isPublic() {
return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
|| ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0;
|| ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;
}
/**

View File

@ -14,7 +14,9 @@ class Class_ extends ClassLike
const MODIFIER_ABSTRACT = 16;
const MODIFIER_FINAL = 32;
const VISIBILITY_MODIFER_MASK = 7; // 1 | 2 | 4
const VISIBILITY_MODIFIER_MASK = 7; // 1 | 2 | 4
/** @deprecated */
const VISIBILITY_MODIFER_MASK = self::VISIBILITY_MODIFIER_MASK;
/** @var int Type */
public $flags;
@ -85,7 +87,7 @@ class Class_ extends ClassLike
* @internal
*/
public static function verifyModifier($a, $b) {
if ($a & self::VISIBILITY_MODIFER_MASK && $b & self::VISIBILITY_MODIFER_MASK) {
if ($a & self::VISIBILITY_MODIFIER_MASK && $b & self::VISIBILITY_MODIFIER_MASK) {
throw new Error('Multiple access type modifiers are not allowed');
}

View File

@ -35,7 +35,7 @@ class Property extends Node\Stmt
*/
public function isPublic() {
return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
|| ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0;
|| ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;
}
/**