@@ -37,7 +37,7 @@ public function __toString(): string
3737 return $ this ->render ();
3838 }
3939
40- public function appendBody (string $ string , int $ spaces = 8 , bool $ newLine = true ): self
40+ public function appendBody (string $ string , int $ spaces = 8 , bool $ newLine = true ): static
4141 {
4242 if ($ newLine === true ) {
4343 $ this ->body .= PHP_EOL . str_repeat (' ' , $ spaces ) . $ string ;
@@ -48,21 +48,21 @@ public function appendBody(string $string, int $spaces = 8, bool $newLine = true
4848 return $ this ;
4949 }
5050
51- public function addInject (Inject $ inject ): self
51+ public function addInject (Inject $ inject ): static
5252 {
5353 $ this ->injects [] = $ inject ;
5454
5555 return $ this ;
5656 }
5757
58- public function addParameter (ParameterInterface $ parameter ): self
58+ public function addParameter (ParameterInterface $ parameter ): static
5959 {
6060 $ this ->parameters [] = $ parameter ;
6161
6262 return $ this ;
6363 }
6464
65- public function commentBody (): self
65+ public function commentBody (): static
6666 {
6767 $ this ->body = str_replace ("\n" , "\n// " , $ this ->body );
6868
@@ -74,7 +74,7 @@ public function getName(): string
7474 return $ this ->name ;
7575 }
7676
77- public function prependBody (string $ bodyLine , int $ spaces = 8 ): self
77+ public function prependBody (string $ bodyLine , int $ spaces = 8 ): static
7878 {
7979 $ this ->body = PHP_EOL . str_repeat (' ' , $ spaces ) . $ bodyLine . $ this ->body ;
8080
@@ -190,35 +190,35 @@ public function renderSignature(): string
190190 return sprintf (': %s ' , $ this ->returnType );
191191 }
192192
193- public function setBody (string $ body ): self
193+ public function setBody (string $ body ): static
194194 {
195195 $ this ->body = PHP_EOL . $ body ;
196196
197197 return $ this ;
198198 }
199199
200- public function setComment (string $ comment ): self
200+ public function setComment (string $ comment ): static
201201 {
202202 $ this ->comment = $ comment ;
203203
204204 return $ this ;
205205 }
206206
207- public function setNullable (bool $ nullable ): self
207+ public function setNullable (bool $ nullable ): static
208208 {
209209 $ this ->nullable = $ nullable ;
210210
211211 return $ this ;
212212 }
213213
214- public function setReturnType (string $ returnType ): self
214+ public function setReturnType (string $ returnType ): static
215215 {
216216 $ this ->returnType = $ returnType ;
217217
218218 return $ this ;
219219 }
220220
221- public function setVisibility (VisibilityEnum $ visibility ): self
221+ public function setVisibility (VisibilityEnum $ visibility ): static
222222 {
223223 $ this ->visibility = $ visibility ;
224224
0 commit comments