Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
Since it is not very clear how isEmpty() works, I added a short note to clarify that it returns true if one of the supplied variables is empty (instead of all of them).
  • Loading branch information
grandeljay committed Oct 10, 2022
1 parent cc6ad93 commit d2ea064
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ function getDirectory(string $path, int $position): ?string
return $dirs[$position + 1] ?? null;
}

/**
* Determine whether at least one of the supplied variables is empty.
*
* @param mixed ...$values The values to check.
*
* @return boolean
*/
function isEmpty(mixed ...$values): bool
{
$skipValues = array(
Expand Down

0 comments on commit d2ea064

Please sign in to comment.