|
19 | 19 | use PhpParser\NodeTraverser; |
20 | 20 | use PhpParser\NodeVisitor; |
21 | 21 | use PhpParser\Parser; |
| 22 | +use PhpParser\PrettyPrinter\Standard; |
| 23 | +use PhpParser\PrettyPrinterAbstract; |
22 | 24 |
|
23 | 25 | final class ClassMethodBuilder |
24 | 26 | { |
@@ -134,6 +136,13 @@ public function getParameters(): array |
134 | 136 | return $this->parameters; |
135 | 137 | } |
136 | 138 |
|
| 139 | + public function setTyped(bool $typed): self |
| 140 | + { |
| 141 | + $this->typed = $typed; |
| 142 | + |
| 143 | + return $this; |
| 144 | + } |
| 145 | + |
137 | 146 | public function isTyped(): bool |
138 | 147 | { |
139 | 148 | return $this->typed; |
@@ -165,29 +174,35 @@ public function getDocBlockComment(): ?string |
165 | 174 | return $this->docBlockComment; |
166 | 175 | } |
167 | 176 |
|
168 | | - public function setDocBlockComment(?string $docBlockComment): void |
| 177 | + public function setDocBlockComment(?string $docBlockComment): self |
169 | 178 | { |
170 | 179 | $this->docBlockComment = $docBlockComment; |
| 180 | + |
| 181 | + return $this; |
171 | 182 | } |
172 | 183 |
|
173 | 184 | public function getReturnTypeDocBlockHint(): string |
174 | 185 | { |
175 | 186 | return $this->returnTypeDocBlockHint; |
176 | 187 | } |
177 | 188 |
|
178 | | - public function setReturnTypeDocBlockHint(?string $typeDocBlockHint): void |
| 189 | + public function setReturnTypeDocBlockHint(?string $typeDocBlockHint): self |
179 | 190 | { |
180 | 191 | $this->returnTypeDocBlockHint = $typeDocBlockHint; |
| 192 | + |
| 193 | + return $this; |
181 | 194 | } |
182 | 195 |
|
183 | 196 | public function getDocBlock(): ?DocBlock |
184 | 197 | { |
185 | 198 | return $this->docBlock; |
186 | 199 | } |
187 | 200 |
|
188 | | - public function overrideDocBlock(?DocBlock $docBlock): void |
| 201 | + public function overrideDocBlock(?DocBlock $docBlock): self |
189 | 202 | { |
190 | 203 | $this->docBlock = $docBlock; |
| 204 | + |
| 205 | + return $this; |
191 | 206 | } |
192 | 207 |
|
193 | 208 | public function setFinal(bool $final): self |
|
0 commit comments