Skip to content

Updated docs #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/nodes_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,40 @@ $this->someProperty->methodName()

declare(strict_types=1);

use PhpParser\Node\Arg;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Identifier;
use PhpParser\Node\Scalar\String_;

$variable = new Variable('someObject');

$args = [];
$args[] = new Arg(new String_('yes'));
$args[] = new Arg(
value: new Variable('maybe'),
name: new Identifier(
name: 'argName'
)
);

$call = new MethodCall($variable, 'methodName', $args);
$callNext = new MethodCall($call, 'nextMethodName');
```


```php
$someObject->methodName('yes', argName: $maybe)->nextMethodName()
```

<br>

```php
<?php

declare(strict_types=1);

use PhpParser\Node\Arg;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\Variable;
Expand Down