@@ -14,6 +14,7 @@ inline constexpr uint32_t capturedResults = 0;
1414inline constexpr uint32_t expressionResultFactory = 1 ;
1515inline constexpr uint32_t defaultNarrowingHelper = 2 ;
1616inline constexpr uint32_t booleanNarrowingHelper = 3 ;
17+ inline constexpr uint32_t treatPhpDocTypesAsCertain = 4 ;
1718} // namespace slot
1819
1920inline void declareClass (reg::Class &cls)
@@ -29,6 +30,7 @@ inline void declareProperties(reg::Class &cls)
2930 cls.property (" expressionResultFactory" , ZEND_ACC_PRIVATE , reg::PropertyKind::Typed, 0 , " PHPStan\\ Analyser\\ ExpressionResultFactory" );
3031 cls.property (" defaultNarrowingHelper" , ZEND_ACC_PRIVATE , reg::PropertyKind::Typed, 0 , " PHPStan\\ Analyser\\ ExprHandler\\ Helper\\ DefaultNarrowingHelper" );
3132 cls.property (" booleanNarrowingHelper" , ZEND_ACC_PRIVATE , reg::PropertyKind::Typed, 0 , " PHPStan\\ Analyser\\ ExprHandler\\ Helper\\ BooleanNarrowingHelper" );
33+ cls.property (" treatPhpDocTypesAsCertain" , ZEND_ACC_PRIVATE , reg::PropertyKind::Typed, MAY_BE_BOOL );
3234}
3335
3436/* the string and parameter tables the signatures below index into (see reg::Sig) */
@@ -42,57 +44,59 @@ inline constexpr char strings[] =
4244 " PHPStan\\ Analyser\\ ExprHandler\\ Helper\\ DefaultNarrowingHelper\0 " /* 112 */
4345 " booleanNarrowingHelper\0 " /* 171 */
4446 " PHPStan\\ Analyser\\ ExprHandler\\ Helper\\ BooleanNarrowingHelper\0 " /* 194 */
45- " __construct\0 " /* 253 */
46- " expr\0 " /* 265 */
47- " PhpParser\\ Node\\ Expr\0 " /* 270 */
48- " supports\0 " /* 290 */
49- " PhpParser\\ Node\\ Expr\\ Ternary\0 " /* 299 */
50- " getCapturedResults\0 " /* 327 */
51- " nodeScopeResolver\0 " /* 346 */
52- " PHPStan\\ Analyser\\ NodeScopeResolver\0 " /* 364 */
53- " stmt\0 " /* 399 */
54- " PhpParser\\ Node\\ Stmt\0 " /* 404 */
55- " scope\0 " /* 424 */
56- " PHPStan\\ Analyser\\ MutatingScope\0 " /* 430 */
57- " storage\0 " /* 461 */
58- " PHPStan\\ Analyser\\ ExpressionResultStorage\0 " /* 469 */
59- " nodeCallback\0 " /* 510 */
60- " context\0 " /* 523 */
61- " PHPStan\\ Analyser\\ ExpressionContext\0 " /* 531 */
62- " PHPStan\\ Analyser\\ ExpressionResult\0 " /* 566 */
63- " processExpr\0 " /* 600 */
64- " isDisjunction\0 " /* 612 */
65- " armExpr\0 " /* 626 */
66- " armResult\0 " /* 634 */
67- " processingScope\0 " /* 644 */
68- " evaluatedScope\0 " /* 660 */
69- " armContext\0 " /* 675 */
70- " PHPStan\\ Analyser\\ TypeSpecifierContext\0 " /* 686 */
71- " createArmOperand" ; /* 724 */
47+ " treatPhpDocTypesAsCertain\0 " /* 253 */
48+ " __construct\0 " /* 279 */
49+ " expr\0 " /* 291 */
50+ " PhpParser\\ Node\\ Expr\0 " /* 296 */
51+ " supports\0 " /* 316 */
52+ " PhpParser\\ Node\\ Expr\\ Ternary\0 " /* 325 */
53+ " getCapturedResults\0 " /* 353 */
54+ " nodeScopeResolver\0 " /* 372 */
55+ " PHPStan\\ Analyser\\ NodeScopeResolver\0 " /* 390 */
56+ " stmt\0 " /* 425 */
57+ " PhpParser\\ Node\\ Stmt\0 " /* 430 */
58+ " scope\0 " /* 450 */
59+ " PHPStan\\ Analyser\\ MutatingScope\0 " /* 456 */
60+ " storage\0 " /* 487 */
61+ " PHPStan\\ Analyser\\ ExpressionResultStorage\0 " /* 495 */
62+ " nodeCallback\0 " /* 536 */
63+ " context\0 " /* 549 */
64+ " PHPStan\\ Analyser\\ ExpressionContext\0 " /* 557 */
65+ " PHPStan\\ Analyser\\ ExpressionResult\0 " /* 592 */
66+ " processExpr\0 " /* 626 */
67+ " isDisjunction\0 " /* 638 */
68+ " armExpr\0 " /* 652 */
69+ " armResult\0 " /* 660 */
70+ " processingScope\0 " /* 670 */
71+ " evaluatedScope\0 " /* 686 */
72+ " armContext\0 " /* 701 */
73+ " PHPStan\\ Analyser\\ TypeSpecifierContext\0 " /* 712 */
74+ " createArmOperand" ; /* 750 */
7275inline constexpr reg::PackedArg args[] = {
7376 reg::packed (0 , MAY_BE_VOID ), /* resetFileAnalysisState return */
7477 reg::packed (24 , 0 , 48 ), /* __construct $expressionResultFactory */
7578 reg::packed (89 , 0 , 112 ), /* __construct $defaultNarrowingHelper */
7679 reg::packed (171 , 0 , 194 ), /* __construct $booleanNarrowingHelper */
77- reg::packed (265 , 0 , 270 ), /* supports $expr */
80+ reg::packed (253 , MAY_BE_BOOL ), /* __construct $treatPhpDocTypesAsCertain */
81+ reg::packed (291 , 0 , 296 ), /* supports $expr */
7882 reg::packed (0 , MAY_BE_BOOL ), /* supports return */
79- reg::packed (265 , 0 , 299 ), /* getCapturedResults $expr */
83+ reg::packed (291 , 0 , 325 ), /* getCapturedResults $expr */
8084 reg::packed (0 , MAY_BE_NULL | MAY_BE_ARRAY ), /* getCapturedResults return */
81- reg::packed (346 , 0 , 364 ), /* processExpr $nodeScopeResolver */
82- reg::packed (399 , 0 , 404 ), /* processExpr $stmt */
83- reg::packed (265 , 0 , 270 ), /* processExpr $expr */
84- reg::packed (424 , 0 , 430 ), /* processExpr $scope */
85- reg::packed (461 , 0 , 469 ), /* processExpr $storage */
86- reg::packed (510 , MAY_BE_CALLABLE ), /* processExpr $nodeCallback */
87- reg::packed (523 , 0 , 531 ), /* processExpr $context */
88- reg::packed (0 , 0 , 566 ), /* processExpr return */
89- reg::packed (265 , 0 , 270 ), /* isDisjunction $expr */
85+ reg::packed (372 , 0 , 390 ), /* processExpr $nodeScopeResolver */
86+ reg::packed (425 , 0 , 430 ), /* processExpr $stmt */
87+ reg::packed (291 , 0 , 296 ), /* processExpr $expr */
88+ reg::packed (450 , 0 , 456 ), /* processExpr $scope */
89+ reg::packed (487 , 0 , 495 ), /* processExpr $storage */
90+ reg::packed (536 , MAY_BE_CALLABLE ), /* processExpr $nodeCallback */
91+ reg::packed (549 , 0 , 557 ), /* processExpr $context */
92+ reg::packed (0 , 0 , 592 ), /* processExpr return */
93+ reg::packed (291 , 0 , 296 ), /* isDisjunction $expr */
9094 reg::packed (0 , MAY_BE_BOOL ), /* isDisjunction return */
91- reg::packed (626 , 0 , 270 ), /* createArmOperand $armExpr */
92- reg::packed (634 , 0 , 566 ), /* createArmOperand $armResult */
93- reg::packed (644 , 0 , 430 ), /* createArmOperand $processingScope */
94- reg::packed (660 , 0 , 430 ), /* createArmOperand $evaluatedScope */
95- reg::packed (675 , MAY_BE_NULL , 686 ), /* createArmOperand $armContext */
95+ reg::packed (652 , 0 , 296 ), /* createArmOperand $armExpr */
96+ reg::packed (660 , 0 , 592 ), /* createArmOperand $armResult */
97+ reg::packed (670 , 0 , 456 ), /* createArmOperand $processingScope */
98+ reg::packed (686 , 0 , 456 ), /* createArmOperand $evaluatedScope */
99+ reg::packed (701 , MAY_BE_NULL , 712 ), /* createArmOperand $armContext */
96100 reg::packed (0 , MAY_BE_ARRAY ), /* createArmOperand return */
97101};
98102using Sig = reg::Sig<strings, args>;
@@ -101,12 +105,12 @@ using Sig = reg::Sig<strings, args>;
101105/* the signatures of the methods the class declares itself (a used trait's are in the trait's header) */
102106namespace sig {
103107inline constexpr sigtab::Sig resetFileAnalysisState = { { 1 /* resetFileAnalysisState */ , 0 , 0 , 0 , 0 , ZEND_ACC_PUBLIC } };
104- inline constexpr sigtab::Sig __construct = { { 253 /* __construct */ , 3 , 1 , 3 , reg::NoArg, ZEND_ACC_PUBLIC } };
105- inline constexpr sigtab::Sig supports = { { 290 /* supports */ , 1 , 4 , 1 , 5 , ZEND_ACC_PUBLIC } };
106- inline constexpr sigtab::Sig getCapturedResults = { { 327 /* getCapturedResults */ , 1 , 6 , 1 , 7 , ZEND_ACC_PUBLIC } };
107- inline constexpr sigtab::Sig processExpr = { { 600 /* processExpr */ , 7 , 8 , 7 , 15 , ZEND_ACC_PUBLIC } };
108- inline constexpr sigtab::Sig isDisjunction = { { 612 /* isDisjunction */ , 1 , 16 , 1 , 17 , ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } };
109- inline constexpr sigtab::Sig createArmOperand = { { 724 /* createArmOperand */ , 5 , 18 , 5 , 23 , ZEND_ACC_PRIVATE } };
108+ inline constexpr sigtab::Sig __construct = { { 279 /* __construct */ , 4 , 1 , 4 , reg::NoArg, ZEND_ACC_PUBLIC } };
109+ inline constexpr sigtab::Sig supports = { { 316 /* supports */ , 1 , 5 , 1 , 6 , ZEND_ACC_PUBLIC } };
110+ inline constexpr sigtab::Sig getCapturedResults = { { 353 /* getCapturedResults */ , 1 , 7 , 1 , 8 , ZEND_ACC_PUBLIC } };
111+ inline constexpr sigtab::Sig processExpr = { { 626 /* processExpr */ , 7 , 9 , 7 , 16 , ZEND_ACC_PUBLIC } };
112+ inline constexpr sigtab::Sig isDisjunction = { { 638 /* isDisjunction */ , 1 , 17 , 1 , 18 , ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } };
113+ inline constexpr sigtab::Sig createArmOperand = { { 750 /* createArmOperand */ , 5 , 19 , 5 , 24 , ZEND_ACC_PRIVATE } };
110114} // namespace sig
111115
112116} // namespace ptdecl::TernaryHandler
0 commit comments