1 | <?php declare(strict_types = 1); |
||
13 | class CommentsGenerator extends AbstractGenerator |
||
14 | { |
||
15 | /** |
||
16 | * Set @var comment line. |
||
17 | * |
||
18 | * @param string $type Type |
||
19 | * @param string|null $description Description |
||
20 | * |
||
21 | * @return CommentsGenerator |
||
22 | */ |
||
23 | public function defVar(string $type, string $description = null) : CommentsGenerator |
||
27 | |||
28 | /** |
||
29 | * Add function code line. |
||
30 | * |
||
31 | * @param string $code Code line |
||
32 | * |
||
33 | * @return $this |
||
34 | */ |
||
35 | public function defLine(string $code) |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | public function code(int $indentation = 0) : string |
||
53 | |||
54 | /** |
||
55 | * Format comments code into single line comment. |
||
56 | * |
||
57 | * @param string $indentation Indentation string |
||
58 | * |
||
59 | * @return string Single line comments code |
||
60 | */ |
||
61 | protected function formatSingleLine(string $indentation) |
||
65 | |||
66 | /** |
||
67 | * Format comments code into multi line comment. |
||
68 | * |
||
69 | * @param string $indentation Indentation string |
||
70 | * |
||
71 | * @return string Multi-line comments code |
||
72 | */ |
||
73 | protected function formatMultiLine(string $indentation) |
||
86 | } |
||
87 |