Skip to content

Commit

Permalink
Update documentation for Entity::has().
Browse files Browse the repository at this point in the history
Reflect how the code actually works.

Refs #8494
  • Loading branch information
markstory committed Mar 22, 2016
1 parent 23a1e1c commit a37465c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Datasource/EntityTrait.php
Expand Up @@ -317,7 +317,7 @@ public function getOriginal($property)

/**
* Returns whether this entity contains a property named $property
* regardless of if it is empty.
* that contains a non-null value.
*
* ### Example:
*
Expand All @@ -328,6 +328,14 @@ public function getOriginal($property)
* $entity->has('last_name'); // false
* ```
*
* You can check multiple properties by passing an array:
*
* ```
* $entity->has(['name', 'last_name']);
* ```
*
* All properties must not be null to get a truthy result.
*
* When checking multiple properties. All properties must not be null
* in order for true to be returned.
*
Expand Down

0 comments on commit a37465c

Please sign in to comment.