From 901b895c023769ab6d8a25bf35c61c1aa2e52aa7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 19 Apr 2017 11:20:05 +0200 Subject: [PATCH] Fix spelling of VISIBILITY_MODIFIER_MASK --- lib/PhpParser/Node/Stmt/ClassConst.php | 2 +- lib/PhpParser/Node/Stmt/ClassMethod.php | 2 +- lib/PhpParser/Node/Stmt/Class_.php | 6 ++++-- lib/PhpParser/Node/Stmt/Property.php | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/PhpParser/Node/Stmt/ClassConst.php b/lib/PhpParser/Node/Stmt/ClassConst.php index 5e566fc1..0d41094f 100644 --- a/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/lib/PhpParser/Node/Stmt/ClassConst.php @@ -30,7 +30,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; } public function isProtected() { diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index 6391c41d..5d167cf2 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -69,7 +69,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; } public function isProtected() { diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 7e624da6..0a65e374 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -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; @@ -74,7 +76,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'); } diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index 2a94ca45..420f055e 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -34,7 +34,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; } public function isProtected() {