File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1- import { getPrecedence , shouldFlatten , isBitwiseOperator } from "./util.mjs" ;
1+ import {
2+ getPrecedence ,
3+ shouldFlatten ,
4+ isBitwiseOperator ,
5+ isMinVersion ,
6+ } from "./util.mjs" ;
27
38function needsParens ( path , options ) {
49 const { parent } = path ;
@@ -134,7 +139,7 @@ function needsParens(path, options) {
134139 case "staticlookup" :
135140 case "offsetlookup" :
136141 case "call" :
137- return key === "what" ;
142+ return key === "what" && ! isMinVersion ( options . phpVersion , "8.4" ) ;
138143 default :
139144 return false ;
140145 }
Original file line number Diff line number Diff line change @@ -654,12 +654,12 @@ abstract class A
654654 }
655655}
656656
657- $class = ( new Foo() )->veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongMethod();
658- $class = ( new Foo([
657+ $class = new Foo()->veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongMethod();
658+ $class = new Foo([
659659 " VeryVeryVeryVeryVeryVeryVeryVeryVeryLongKey" =>
660660 " VeryVeryVeryVeryVeryVeryVeryVeryVeryLongValue" ,
661- ])) ->veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongMethod();
662- $class = ( new PendingDispatch(new $this- >class(...func_get_args() )))->chain(
661+ ])->veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongMethod();
662+ $class = new PendingDispatch(new $this- >class(...func_get_args()))->chain(
663663 $this->chain,
664664);
665665$dumper = in_array(PHP_SAPI, ["cli", "phpdbg"])
@@ -676,7 +676,7 @@ $class = new static(
676676$response = new \\Illuminate\\Http\\JsonResponse(
677677 new JsonResponseTestJsonSerializeObject(),
678678);
679- $result = ( new Pipeline(new \\Illuminate\\Container\\Container() ))
679+ $result = new Pipeline(new \\Illuminate\\Container\\Container())
680680 ->send("foo")
681681 ->through([new PipelineTestPipeOne()])
682682 ->then(function ($piped) {
You can’t perform that action at this time.
0 commit comments