Skip to content

Commit 6f18eb4

Browse files
committed
removed useless type juggling
1 parent 8e1022f commit 6f18eb4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/PhpGenerator/Parameter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function isReference(): bool
5959
*/
6060
public function setTypeHint(?string $hint): self
6161
{
62-
$this->typeHint = $hint ? (string) $hint : null;
62+
$this->typeHint = $hint;
6363
return $this;
6464
}
6565

src/PhpGenerator/Traits/CommentAware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ trait CommentAware
2424
*/
2525
public function setComment(?string $val): self
2626
{
27-
$this->comment = $val ? (string) $val : null;
27+
$this->comment = $val;
2828
return $this;
2929
}
3030

src/PhpGenerator/Traits/FunctionLike.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function isVariadic(): bool
128128
*/
129129
public function setReturnType(?string $val): self
130130
{
131-
$this->returnType = $val ? (string) $val : null;
131+
$this->returnType = $val;
132132
return $this;
133133
}
134134

0 commit comments

Comments
 (0)