Closed mpspm closed 2 years ago
Under the single responsibility principle "good" example, should the return type for getFullNameAttribute() be "string" and not "bool"?
public function getFullNameAttribute(): bool { return $this->isVerifiedClient() ? $this->getFullNameLong() : $this->getFullNameShort(); }
I suspect this is a mistake since calling this function would cause an error. The two ternary options both return string type values.
Under the single responsibility principle "good" example, should the return type for getFullNameAttribute() be "string" and not "bool"?