Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nilportugues/api-transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
nilportugues committed Dec 6, 2015
2 parents 0fe71bd + 26e545e commit 2837f25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Transformer/Helpers/RecursiveFilterHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ private static function filterKeys(
array &$idProperties
) {
foreach ($array as $key => &$value) {
if (self::isPreservableKey($key, $keepKeys, $idProperties)) {
if (self::isPreservableKey($key, $keepKeys, $idProperties)
|| false === in_array($key, $mappings[$typeKey]->getProperties())
) {
$newArray[$key] = $value;
if (\is_array($newArray[$key])) {
self::deletePropertiesNotInFilter($mappings, $newArray[$key], $typeKey);
Expand Down

0 comments on commit 2837f25

Please sign in to comment.