1Modifier change
2-----
3<?php
4class Foo {}
5abstract class Bar {
6    const
7    FOO = 42;
8
9    var $foo
10    = 24;
11
12    public function
13    foo() {}
14}
15-----
16$stmts[0]->flags = Stmt\Class_::MODIFIER_ABSTRACT;
17$stmts[1]->flags = 0;
18$stmts[1]->stmts[0]->flags = Stmt\Class_::MODIFIER_PRIVATE;
19$stmts[1]->stmts[1]->flags = Stmt\Class_::MODIFIER_PROTECTED;
20$stmts[1]->stmts[2]->flags |= Stmt\Class_::MODIFIER_FINAL;
21-----
22<?php
23abstract class Foo {}
24class Bar {
25    private const
26    FOO = 42;
27
28    protected $foo
29    = 24;
30
31    final public function
32    foo() {}
33}
34-----
35<?php
36function test(
37    public T1 $x
38        = 'y',
39    private T2 $y
40        = 'z',
41    T3 $z
42        = 'x',
43) {}
44-----
45$stmts[0]->params[0]->flags = Stmt\Class_::MODIFIER_PRIVATE;
46$stmts[0]->params[1]->flags = 0;
47$stmts[0]->params[2]->flags = Stmt\Class_::MODIFIER_PUBLIC;
48-----
49<?php
50function test(
51    private T1 $x
52        = 'y',
53    T2 $y
54        = 'z',
55    public T3 $z
56        = 'x',
57) {}
58-----
59<?php
60new class {};
61new readonly class {};
62-----
63$stmts[0]->expr->class->flags = Modifiers::READONLY;
64$stmts[1]->expr->class->flags = 0;
65-----
66<?php
67readonly class {};
68class {};
69