You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question about inheritance: is it allowed? Cause the class is not final, but properties are private, and static methods use & return self instead of static, making inheritance not really possible (parent class will be returned instead of child)
Asking 1. because I just need a method that return the value. Using valueOr is a bit disturbing when using hasValue.
$data = [];
$some = Option::some('value');
if ($some->hasValue()) {
$data[] = $some->valueOr(null); // this is disturbing
}
Regards,
The text was updated successfully, but these errors were encountered:
Hi,
Question about inheritance: is it allowed? Cause the class is not final, but properties are
private
, and static methods use & returnself
instead ofstatic
, making inheritance not really possible (parent class will be returned instead of child)Asking 1. because I just need a method that return the value. Using
valueOr
is a bit disturbing when usinghasValue
.Regards,
The text was updated successfully, but these errors were encountered: