Nikita Popov
afe1628a72
Add support for NodeVisitor::REPLACE_WITH_NULL
...
Fixes #716 .
2023-05-21 15:41:41 +02:00
Nikita Popov
93731c5cfa
Move constants from NodeTraverser to NodeVisitor
...
These are really part of the NodeVisitor API. Retain aliases for
compatibility.
2023-05-20 21:37:34 +02:00
Nikita Popov
f59f226f65
Fix some phpstan warnings
2022-09-11 12:16:12 +02:00
Nikita Popov
a3b0541c71
Support array return from enterNode()
...
This uses the same semantics as arrays from leaveNode(), i.e. the
returned nodes will not be visited by other visitors. This is open
to change though (but probably should change for both enterNode()
and leaveNode() if it does change?)
2022-09-03 18:38:22 +02:00
Nikita Popov
c42290ae42
Support REMOVE_NODE from enterNode()
2022-09-03 18:15:36 +02:00
Nikita Popov
dd63ddbc24
Add php-cs-fixer config and reformat
...
The formatting in this project has become something of a mess,
because it changed over time. Add a CS fixer config and reformat
to the desired style, which is PSR-12, but with sane brace placement.
2022-08-28 22:57:06 +02:00
Gabriel Caruso
68d07c4662
[CS] New line in the end of file
2018-01-13 16:08:26 +01:00
TomasVotruba
e2e99f269b
Add strict_types to lib code
2017-08-18 23:00:13 +02:00
Nikita Popov
987c61e935
Drop support for false return value in NodeTraverser
2017-02-03 22:36:57 +01:00
Nikita Popov
5cc2750ebc
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/NodeVisitor.php
2017-01-29 22:36:33 +01:00
Nikita Popov
58e7881e98
Implement NodeTraverser::STOP_TRAVERSAL
...
Conflicts:
lib/PhpParser/NodeVisitor.php
2017-01-29 22:35:40 +01:00
Nikita Popov
70f86cb6cb
Update NodeVisitor doc comments
2017-01-25 23:28:44 +01:00
nikic
f82862ec9c
Port library to use namespaces, with BC for old names
2014-02-06 20:29:35 +01:00