mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-04 18:38:05 +01:00
29 lines
316 B
Plaintext
29 lines
316 B
Plaintext
Comment changes
|
|
-----
|
|
<?php
|
|
// Test
|
|
foo();
|
|
-----
|
|
$stmts[0]->setAttribute('comments', []);
|
|
-----
|
|
<?php
|
|
foo();
|
|
-----
|
|
<?php
|
|
$foo;
|
|
|
|
|
|
/* bar */
|
|
$baz;
|
|
-----
|
|
$comments = $stmts[1]->getComments();
|
|
$comments[] = new Comment("// foo");
|
|
$stmts[1]->setAttribute('comments', $comments);
|
|
-----
|
|
<?php
|
|
$foo;
|
|
|
|
|
|
/* bar */
|
|
// foo
|
|
$baz; |