diff --git a/composer.json b/composer.json index 3f43800..06a5724 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "-", "license": "MIT", "require": { - "consistence/consistence": "~1.0", + "consistence/consistence": "~2.0", "doctrine/inflector": "~1.0" }, "require-dev": { diff --git a/src/Metadata/Visibility.php b/src/Metadata/Visibility.php index 288b73e..a9fb384 100644 --- a/src/Metadata/Visibility.php +++ b/src/Metadata/Visibility.php @@ -11,8 +11,7 @@ class Visibility extends \Consistence\Enum\Enum public const VISIBILITY_PROTECTED = 'protected'; public const VISIBILITY_PRIVATE = 'private'; - /** @var int[] */ - private static $comparationValues = [ + private const COMPARATION_VALUES = [ self::VISIBILITY_PRIVATE => 1, self::VISIBILITY_PROTECTED => 2, self::VISIBILITY_PUBLIC => 3, @@ -25,7 +24,7 @@ public function getName(): string public function isLooserOrEqualTo(self $visibility): bool { - return self::$comparationValues[$this->getValue()] >= self::$comparationValues[$visibility->getValue()]; + return self::COMPARATION_VALUES[$this->getValue()] >= self::COMPARATION_VALUES[$visibility->getValue()]; } /**