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