1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Php;
4:
5: use PHPStan\TrinaryLogic;
6: use PHPStan\Type\IntegerRangeType;
7: use PHPStan\Type\Type;
8:
9: /**
10: * @api
11: */
12: final class PhpVersions
13: {
14:
15: public function __construct(
16: private Type $phpVersions,
17: )
18: {
19: }
20:
21: public function getType(): Type
22: {
23: return $this->phpVersions;
24: }
25:
26: public function supportsNoncapturingCatches(): TrinaryLogic
27: {
28: return IntegerRangeType::fromInterval(80000, null)->isSuperTypeOf($this->phpVersions)->result;
29: }
30:
31: public function producesWarningForFinalPrivateMethods(): TrinaryLogic
32: {
33: return IntegerRangeType::fromInterval(80000, null)->isSuperTypeOf($this->phpVersions)->result;
34: }
35:
36: public function supportsNamedArguments(): TrinaryLogic
37: {
38: return IntegerRangeType::fromInterval(80000, null)->isSuperTypeOf($this->phpVersions)->result;
39: }
40:
41: }
42: