mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-27 04:24:43 +01:00
Merge branch '3.x'
This commit is contained in:
commit
ba85da88a0
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user