1Comment changes
2-----
3<?php
4// Test
5foo();
6-----
7$stmts[0]->setAttribute('comments', []);
8-----
9<?php
10foo();
11-----
12<?php
13$foo;
14
15
16/* bar */
17$baz;
18-----
19$comments = $stmts[1]->getComments();
20$comments[] = new Comment("// foo");
21$stmts[1]->setAttribute('comments', $comments);
22-----
23<?php
24$foo;
25
26
27/* bar */
28// foo
29$baz;
30-----
31<?php
32class Test {
33    /**
34     * @expectedException \FooException
35     */
36    public function test() {
37        // some code
38    }
39}
40-----
41$method = $stmts[0]->stmts[0];
42$method->setAttribute('comments', [new Comment\Doc("/**\n *\n */")]);
43-----
44<?php
45class Test {
46    /**
47     *
48     */
49    public function test() {
50        // some code
51    }
52}
53-----
54<?php
55    class Example {
56    }
57-----
58$stmts[0]->setDocComment(new Comment\Doc("/** foo */"));
59-----
60<?php
61    /** foo */
62    class Example {
63    }
64