Open
Description
Add a rule for fluent setter, the rule is to be defined But I believe we expect the return type to be self
instead of the class name
public function setValue($value): self
{
$this->value = $value;
return $this;
}
The idea is not to force all setters to be fluent, however when a function returns $this
I guess we can consider it as a "fluent functions" so in this case we can expect its return type to be self
Metadata
Metadata
Assignees
Labels
No labels