Skip to content

Commit

Permalink
feat(construction): allow passing of null/bool values
Browse files Browse the repository at this point in the history
  • Loading branch information
alwaysblank committed Jul 16, 2019
1 parent 4900458 commit 081f353
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Brief.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ protected static function normalizeInput($items)
return get_object_vars($items);
}

if (null === $items || is_bool($items)) {
return [];
}

if ( ! is_array($items)) {
throw new WrongArgumentTypeException("Did not pass array or iterable object.");
}
Expand Down

0 comments on commit 081f353

Please sign in to comment.