Skip to content

Commit

Permalink
Fix CS with PHP-CS-Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude committed Apr 26, 2024
1 parent d4e0296 commit b9ef678
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Doctrine/PolyglotListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private function loadTranslationMetadataForClass($className, EntityManager $em):
$cacheDriver = $em->getConfiguration()->getMetadataCacheImpl();

if ($cacheDriver) {
$cacheKey = $this->getCacheKey($class);
$cacheKey = $this->getCacheKey($className);
if (($data = $cacheDriver->fetch($cacheKey)) !== false) {
if (null === $data) {
$this->translatedClasses[$className] = null;
Expand Down Expand Up @@ -175,9 +175,9 @@ private function getCacheKey(string $class): string
{
if (str_contains($class, '@')) {
// anonymous class: replace all PSR6-reserved characters
return str_replace(["\0", '\\', '/', '@', ':', '{', '}', '(', ')'], '.', $class) . self::CACHE_SALT;
return str_replace(["\0", '\\', '/', '@', ':', '{', '}', '(', ')'], '.', $class).self::CACHE_SALT;
}

return str_replace('\\', '.', $class) . self::CACHE_SALT;
return str_replace('\\', '.', $class).self::CACHE_SALT;
}
}

0 comments on commit b9ef678

Please sign in to comment.