File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ final class ClassType
50
50
/** @var string[] */
51
51
private $ implements = [];
52
52
53
- /** @var string [] */
53
+ /** @var array [] */
54
54
private $ traits = [];
55
55
56
56
/** @var Constant[] name => Constant */
@@ -422,7 +422,7 @@ public function addMethod(string $name): Method
422
422
}
423
423
424
424
425
- private function validate (array $ names )
425
+ private function validate (array $ names ): void
426
426
{
427
427
foreach ($ names as $ name ) {
428
428
if (!Helpers::isNamespaceIdentifier ($ name , true )) {
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ public function __toString(): string
79
79
*/
80
80
public function setBody (?string $ code , array $ args = null ): self
81
81
{
82
- $ this ->body = $ args === null ? $ code : Helpers::formatArgs ($ code , $ args );
82
+ $ this ->body = $ args === null || $ code === null ? $ code : Helpers::formatArgs ($ code , $ args );
83
83
return $ this ;
84
84
}
85
85
You can’t perform that action at this time.
0 commit comments