Skip to content

Commit

Permalink
default allowed/ignored props to empty arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaidas Bagdonas committed Feb 18, 2020
1 parent 38ed5ea commit 74feb19
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public function updateWithValues($document, array $newValues)
public function updateWithDocument($document, $newDocument, ?array $allowedProperties = [], ?array $ignoredProperties = [])
{
$classReflection = new ReflectionClass($newDocument);
$allowedProperties = $allowedProperties ?: [];
$ignoredProperties = $ignoredProperties ?: [];
$checkAllowedProperties = count($allowedProperties) > 0;
$checkIgnoredProperties = count($ignoredProperties) > 0;

Expand Down

0 comments on commit 74feb19

Please sign in to comment.