Skip to content

Commit

Permalink
fix for closures
Browse files Browse the repository at this point in the history
  • Loading branch information
Henning committed Aug 26, 2021
1 parent 8feb9c3 commit 25cdb15
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private function appendHydrateClosureParts(array &$parts, array $properties): vo
foreach ($properties as $property) {
$propertyName = $property->name;

$parts[] = " \$name = \$this->extractName('" . $propertyName . "', \$object);";
$parts[] = " \$name = \$that->extractName('" . $propertyName . "', \$object);";
$parts[] = " if (isset(\$data[\$name]) || " .
'$object->' . $propertyName . " !== null && \\array_key_exists(\$name, \$data)) {";
$parts[] = $this->getPropertyHydrateString($propertyName, 2, true);
Expand All @@ -127,7 +127,7 @@ private function appendExtractClosureParts(array &$parts, array $properties): vo
foreach ($properties as $property) {
$propertyName = $property->name;

$parts[] = " \$name = \$this->hydrateName('" . $propertyName . "', \$data);";
$parts[] = " \$name = \$that->hydrateName('" . $propertyName . "', \$data);";
$parts[] = $this->getPropertyExtractString($propertyName, 1, true);
}
}
Expand Down

0 comments on commit 25cdb15

Please sign in to comment.