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
The Example in doc block is correctly expressed actual behavior.
But head of doc block is different.
$entity->not_associated; // property is not exists.
$entity->associated_has_one_but_no_record; // there is a property but null
I want discriminate two cases above with EntityTrait::has().
I guess this is one of the reasons EntityTrait::has() is implemented.
Or could it be that head of doc block is wrong?
I think the use of 'empty' is confusing here. As 'empty' means something very specific in PHP which this method is not doing. I can change up the wording to be less confusing.
I think there is a mismatch between doc block and code in
EntityTrait::has()
The Example in doc block is correctly expressed actual behavior.
But head of doc block is different.
I want discriminate two cases above with
EntityTrait::has()
.I guess this is one of the reasons
EntityTrait::has()
is implemented.Or could it be that head of doc block is wrong?
Expected Behavior
Actual Behavior
$entity = new Entity(['id' => 1, 'name' => null]);
$entity->has('name'); // false
The text was updated successfully, but these errors were encountered: