Skip to content

Commit 8326fa0

Browse files
committed
Parameter::setOptional() triggers deprecation notice
1 parent 4ada95e commit 8326fa0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/PhpGenerator/Parameter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public function getTypeHint()
8080
*/
8181
public function setOptional(bool $state = true): self
8282
{
83+
trigger_error(__METHOD__ . '() is deprecated, use setDefaultValue()', E_USER_DEPRECATED);
8384
$this->hasDefaultValue = $state;
8485
return $this;
8586
}

0 commit comments

Comments
 (0)