The expression return $this->docBlock could return the type null which is incompatible with the type-hinted return Murtukov\PHPCodeGenerator\Comment. Consider adding an additional type-check to rule them out.
Loading history...
14
}
15
16
public function setDocBlock(string $text): self
17
{
18
$this->docBlock = Comment::docBlock($text);
19
20
return $this;
21
}
22
23
public function createDocBlock(string $text = ''): Comment