1 | <?php |
||
13 | class SplitItemBuilder implements Builder |
||
14 | { |
||
15 | use BuilderUtils; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | private $gutter = 2; |
||
21 | |||
22 | public function __construct(Builder $parent) |
||
26 | |||
27 | public function build() : SplitItem |
||
36 | |||
37 | public function setSubMenuParents(CliMenu $menu) : void |
||
43 | |||
44 | public function getTerminal() : Terminal |
||
48 | |||
49 | public function getMenuStyle() : MenuStyle |
||
53 | |||
54 | public function end() : CliMenuBuilder |
||
58 | |||
59 | public function setGutter(int $gutter) : SplitItemBuilder |
||
63 | } |
||
64 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: