1 | <?php declare(strict_types = 1); |
||
13 | class PropertyGenerator extends AbstractGenerator |
||
14 | { |
||
15 | /** @var string Property name */ |
||
16 | protected $name; |
||
17 | |||
18 | /** @var bool Flag that method is static */ |
||
19 | protected $isStatic = false; |
||
20 | |||
21 | /** @var string Method visibility */ |
||
22 | protected $visibility = ClassGenerator::VISIBILITY_PUBLIC; |
||
23 | |||
24 | /** |
||
25 | * PropertyGenerator constructor. |
||
26 | * |
||
27 | * @param string $name Property name |
||
28 | * @param AbstractGenerator|null $parent Parent generator |
||
29 | */ |
||
30 | public function __construct(string $name, AbstractGenerator $parent = null) |
||
36 | |||
37 | /** |
||
38 | * Set method to be static. |
||
39 | * |
||
40 | * @return PropertyGenerator |
||
41 | */ |
||
42 | public function defStatic() : PropertyGenerator |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public function code($indentation = 0) : string |
||
64 | } |
||
65 |