Skip to content

Commit

Permalink
Consistence 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
VasekPurchart committed Jan 2, 2019
1 parent a243a81 commit 3d1c1f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "-",
"license": "MIT",
"require": {
"consistence/consistence": "~1.0",
"consistence/consistence": "~2.0",
"doctrine/inflector": "~1.0"
},
"require-dev": {
Expand Down
5 changes: 2 additions & 3 deletions src/Metadata/Visibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()];
}

/**
Expand Down

0 comments on commit 3d1c1f2

Please sign in to comment.