@@ -3382,6 +3382,44 @@ static function (): void {
33823382 $ throwPoints = array_merge ($ condResult ->getThrowPoints (), $ rightResult ->getThrowPoints ());
33833383 $ impurePoints = array_merge ($ condResult ->getImpurePoints (), $ rightResult ->getImpurePoints ());
33843384 $ isAlwaysTerminating = $ condResult ->isAlwaysTerminating ();
3385+ } elseif ($ expr instanceof BinaryOp \Pipe) {
3386+ if ($ expr ->right instanceof FuncCall && $ expr ->right ->isFirstClassCallable ()) {
3387+ $ exprResult = $ this ->processExprNode ($ stmt , new FuncCall ($ expr ->right ->name , [
3388+ new Arg ($ expr ->left , attributes: $ expr ->left ->getAttributes ()),
3389+ ], array_merge ($ expr ->right ->getAttributes (), ['virtualPipeOperatorCall ' => true ])), $ scope , $ nodeCallback , $ context );
3390+ $ scope = $ exprResult ->getScope ();
3391+ $ hasYield = $ exprResult ->hasYield ();
3392+ $ throwPoints = $ exprResult ->getThrowPoints ();
3393+ $ impurePoints = $ exprResult ->getImpurePoints ();
3394+ $ isAlwaysTerminating = $ exprResult ->isAlwaysTerminating ();
3395+ } elseif ($ expr ->right instanceof MethodCall && $ expr ->right ->isFirstClassCallable ()) {
3396+ $ exprResult = $ this ->processExprNode ($ stmt , new MethodCall ($ expr ->right ->var , $ expr ->right ->name , [
3397+ new Arg ($ expr ->left , attributes: $ expr ->left ->getAttributes ()),
3398+ ], array_merge ($ expr ->right ->getAttributes (), ['virtualPipeOperatorCall ' => true ])), $ scope , $ nodeCallback , $ context );
3399+ $ scope = $ exprResult ->getScope ();
3400+ $ hasYield = $ exprResult ->hasYield ();
3401+ $ throwPoints = $ exprResult ->getThrowPoints ();
3402+ $ impurePoints = $ exprResult ->getImpurePoints ();
3403+ $ isAlwaysTerminating = $ exprResult ->isAlwaysTerminating ();
3404+ } elseif ($ expr ->right instanceof StaticCall && $ expr ->right ->isFirstClassCallable ()) {
3405+ $ exprResult = $ this ->processExprNode ($ stmt , new StaticCall ($ expr ->right ->class , $ expr ->right ->name , [
3406+ new Arg ($ expr ->left , attributes: $ expr ->left ->getAttributes ()),
3407+ ], array_merge ($ expr ->right ->getAttributes (), ['virtualPipeOperatorCall ' => true ])), $ scope , $ nodeCallback , $ context );
3408+ $ scope = $ exprResult ->getScope ();
3409+ $ hasYield = $ exprResult ->hasYield ();
3410+ $ throwPoints = $ exprResult ->getThrowPoints ();
3411+ $ impurePoints = $ exprResult ->getImpurePoints ();
3412+ $ isAlwaysTerminating = $ exprResult ->isAlwaysTerminating ();
3413+ } else {
3414+ $ exprResult = $ this ->processExprNode ($ stmt , new FuncCall ($ expr ->right , [
3415+ new Arg ($ expr ->left , attributes: $ expr ->left ->getAttributes ()),
3416+ ], array_merge ($ expr ->right ->getAttributes (), ['virtualPipeOperatorCall ' => true ])), $ scope , $ nodeCallback , $ context );
3417+ $ scope = $ exprResult ->getScope ();
3418+ $ hasYield = $ exprResult ->hasYield ();
3419+ $ throwPoints = $ exprResult ->getThrowPoints ();
3420+ $ impurePoints = $ exprResult ->getImpurePoints ();
3421+ $ isAlwaysTerminating = $ exprResult ->isAlwaysTerminating ();
3422+ }
33853423 } elseif ($ expr instanceof BinaryOp) {
33863424 $ result = $ this ->processExprNode ($ stmt , $ expr ->left , $ scope , $ nodeCallback , $ context ->enterDeep ());
33873425 $ scope = $ result ->getScope ();
0 commit comments