| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\Reflection; |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | final class AllowedConstantsResult |
| 15: | { |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | public function __construct( |
| 22: | private array $disallowedConstants, |
| 23: | private array $violatedExclusiveGroups, |
| 24: | private bool $bitmaskNotAllowed, |
| 25: | ) |
| 26: | { |
| 27: | } |
| 28: | |
| 29: | public function isOk(): bool |
| 30: | { |
| 31: | return $this->disallowedConstants === [] && $this->violatedExclusiveGroups === [] && !$this->bitmaskNotAllowed; |
| 32: | } |
| 33: | |
| 34: | public function isBitmaskNotAllowed(): bool |
| 35: | { |
| 36: | return $this->bitmaskNotAllowed; |
| 37: | } |
| 38: | |
| 39: | |
| 40: | |
| 41: | |
| 42: | public function getDisallowedConstants(): array |
| 43: | { |
| 44: | return $this->disallowedConstants; |
| 45: | } |
| 46: | |
| 47: | |
| 48: | |
| 49: | |
| 50: | public function getViolatedExclusiveGroups(): array |
| 51: | { |
| 52: | return $this->violatedExclusiveGroups; |
| 53: | } |
| 54: | |
| 55: | } |
| 56: | |