mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-07-13 02:16:37 +02:00
Fix spelling of VISIBILITY_MODIFIER_MASK
This commit is contained in:
@ -30,7 +30,7 @@ class ClassConst extends Node\Stmt
|
|||||||
|
|
||||||
public function isPublic() {
|
public function isPublic() {
|
||||||
return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
|
return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
|
||||||
|| ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0;
|
|| ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isProtected() {
|
public function isProtected() {
|
||||||
|
@ -69,7 +69,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike
|
|||||||
|
|
||||||
public function isPublic() {
|
public function isPublic() {
|
||||||
return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
|
return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
|
||||||
|| ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0;
|
|| ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isProtected() {
|
public function isProtected() {
|
||||||
|
@ -14,7 +14,9 @@ class Class_ extends ClassLike
|
|||||||
const MODIFIER_ABSTRACT = 16;
|
const MODIFIER_ABSTRACT = 16;
|
||||||
const MODIFIER_FINAL = 32;
|
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 */
|
/** @var int Type */
|
||||||
public $flags;
|
public $flags;
|
||||||
@ -74,7 +76,7 @@ class Class_ extends ClassLike
|
|||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
public static function verifyModifier($a, $b) {
|
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');
|
throw new Error('Multiple access type modifiers are not allowed');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class Property extends Node\Stmt
|
|||||||
|
|
||||||
public function isPublic() {
|
public function isPublic() {
|
||||||
return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
|
return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
|
||||||
|| ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0;
|
|| ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isProtected() {
|
public function isProtected() {
|
||||||
|
Reference in New Issue
Block a user