File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -1188,6 +1188,40 @@ $this->someProperty->methodName()
1188
1188
1189
1189
declare(strict_types=1);
1190
1190
1191
+ use PhpParser\Node\Arg;
1192
+ use PhpParser\Node\Expr\MethodCall;
1193
+ use PhpParser\Node\Expr\Variable;
1194
+ use PhpParser\Node\Identifier;
1195
+ use PhpParser\Node\Scalar\String_;
1196
+
1197
+ $variable = new Variable('someObject');
1198
+
1199
+ $args = [];
1200
+ $args[] = new Arg(new String_('yes'));
1201
+ $args[] = new Arg(
1202
+ value: new Variable('maybe'),
1203
+ name: new Identifier(
1204
+ name: 'argName'
1205
+ )
1206
+ );
1207
+
1208
+ $call = new MethodCall($variable, 'methodName', $args);
1209
+ $callNext = new MethodCall($call, 'nextMethodName');
1210
+ ```
1211
+
1212
+ ↓
1213
+
1214
+ ``` php
1215
+ $someObject->methodName('yes', argName: $maybe)->nextMethodName()
1216
+ ```
1217
+
1218
+ <br >
1219
+
1220
+ ``` php
1221
+ <?php
1222
+
1223
+ declare(strict_types=1);
1224
+
1191
1225
use PhpParser\Node\Arg;
1192
1226
use PhpParser\Node\Expr\MethodCall;
1193
1227
use PhpParser\Node\Expr\Variable;
You can’t perform that action at this time.
0 commit comments