Skip to content

Commit

Permalink
fix: terms (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi authored Oct 10, 2024
1 parent 0c34cdf commit 8f28fa6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* feat: attributes inheritance is now preserved
* chore: rector run
* perf: object mapper resolver cache prewarming
* fix: terms

## 1.9.4

Expand Down
12 changes: 6 additions & 6 deletions src/ObjectCache/ObjectCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(
$this->preCache = new \WeakMap();
}

private function isBlacklisted(mixed $source): bool
private function isExcluded(mixed $source): bool
{
return $source instanceof \DateTimeInterface
|| $source instanceof \UnitEnum;
Expand All @@ -58,7 +58,7 @@ public function preCache(mixed $source, Type $targetType): void
return;
}

if ($this->isBlacklisted($source)) {
if ($this->isExcluded($source)) {
return;
}

Expand All @@ -79,7 +79,7 @@ public function undoPreCache(mixed $source, Type $targetType): void
return;
}

if ($this->isBlacklisted($source)) {
if ($this->isExcluded($source)) {
return;
}

Expand All @@ -96,7 +96,7 @@ public function containsTarget(mixed $source, Type $targetType): bool
return false;
}

if ($this->isBlacklisted($source)) {
if ($this->isExcluded($source)) {
return false;
}

Expand All @@ -119,7 +119,7 @@ public function getTarget(mixed $source, Type $targetType): mixed
throw new CircularReferenceException();
}

if ($this->isBlacklisted($source)) {
if ($this->isExcluded($source)) {
throw new CachedTargetObjectNotFoundException();
}

Expand All @@ -138,7 +138,7 @@ public function saveTarget(
return;
}

if ($this->isBlacklisted($source)) {
if ($this->isExcluded($source)) {
return;
}

Expand Down

0 comments on commit 8f28fa6

Please sign in to comment.