@@ -2232,7 +2232,11 @@ static function (): void {
2232
2232
$ throwPoints = array_merge ($ throwPoints , $ invokeResult ->getThrowPoints ());
2233
2233
$ impurePoints = array_merge ($ impurePoints , $ invokeResult ->getImpurePoints ());
2234
2234
} elseif ($ parametersAcceptor instanceof CallableParametersAcceptor) {
2235
- $ throwPoints = array_merge ($ throwPoints , array_map (static fn (SimpleThrowPoint $ throwPoint ) => $ throwPoint ->isExplicit () ? ThrowPoint::createExplicit ($ scope , $ throwPoint ->getType (), $ expr , $ throwPoint ->canContainAnyThrowable ()) : ThrowPoint::createImplicit ($ scope , $ expr ), $ parametersAcceptor ->getThrowPoints ()));
2235
+ $ callableThrowPoints = array_map (static fn (SimpleThrowPoint $ throwPoint ) => $ throwPoint ->isExplicit () ? ThrowPoint::createExplicit ($ scope , $ throwPoint ->getType (), $ expr , $ throwPoint ->canContainAnyThrowable ()) : ThrowPoint::createImplicit ($ scope , $ expr ), $ parametersAcceptor ->getThrowPoints ());
2236
+ if (!$ this ->implicitThrows ) {
2237
+ $ callableThrowPoints = array_values (array_filter ($ callableThrowPoints , static fn (ThrowPoint $ throwPoint ) => $ throwPoint ->isExplicit ()));
2238
+ }
2239
+ $ throwPoints = array_merge ($ throwPoints , $ callableThrowPoints );
2236
2240
$ impurePoints = array_merge ($ impurePoints , array_map (static fn (SimpleImpurePoint $ impurePoint ) => new ImpurePoint ($ scope , $ expr , $ impurePoint ->getIdentifier (), $ impurePoint ->getDescription (), $ impurePoint ->isCertain ()), $ parametersAcceptor ->getImpurePoints ()));
2237
2241
2238
2242
$ scope = $ this ->processImmediatelyCalledCallable ($ scope , $ parametersAcceptor ->getInvalidateExpressions (), $ parametersAcceptor ->getUsedVariables ());
@@ -4404,7 +4408,11 @@ private function processArgs(
4404
4408
if (count ($ acceptors ) === 1 ) {
4405
4409
$ scope = $ this ->processImmediatelyCalledCallable ($ scope , $ acceptors [0 ]->getInvalidateExpressions (), $ acceptors [0 ]->getUsedVariables ());
4406
4410
if ($ callCallbackImmediately ) {
4407
- $ throwPoints = array_merge ($ throwPoints , array_map (static fn (SimpleThrowPoint $ throwPoint ) => $ throwPoint ->isExplicit () ? ThrowPoint::createExplicit ($ scope , $ throwPoint ->getType (), $ arg ->value , $ throwPoint ->canContainAnyThrowable ()) : ThrowPoint::createImplicit ($ scope , $ arg ->value ), $ acceptors [0 ]->getThrowPoints ()));
4411
+ $ callableThrowPoints = array_map (static fn (SimpleThrowPoint $ throwPoint ) => $ throwPoint ->isExplicit () ? ThrowPoint::createExplicit ($ scope , $ throwPoint ->getType (), $ arg ->value , $ throwPoint ->canContainAnyThrowable ()) : ThrowPoint::createImplicit ($ scope , $ arg ->value ), $ acceptors [0 ]->getThrowPoints ());
4412
+ if (!$ this ->implicitThrows ) {
4413
+ $ callableThrowPoints = array_values (array_filter ($ callableThrowPoints , static fn (ThrowPoint $ throwPoint ) => $ throwPoint ->isExplicit ()));
4414
+ }
4415
+ $ throwPoints = array_merge ($ throwPoints , $ callableThrowPoints );
4408
4416
$ impurePoints = array_merge ($ impurePoints , array_map (static fn (SimpleImpurePoint $ impurePoint ) => new ImpurePoint ($ scope , $ arg ->value , $ impurePoint ->getIdentifier (), $ impurePoint ->getDescription (), $ impurePoint ->isCertain ()), $ acceptors [0 ]->getImpurePoints ()));
4409
4417
}
4410
4418
}
0 commit comments