Skip to content

Commit 9e04447

Browse files
author
Emmanuel BORGES
committed
remove function
1 parent f4b9917 commit 9e04447

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/Symfony/Component/Validator/Mapping/Cache/Psr6Cache.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ public function __construct(CacheItemPoolInterface $cacheItemPool)
3333
*/
3434
public function has($class)
3535
{
36-
return $this->cacheItemPool->hasItem($this->escapeClassName($class));
36+
return $this->cacheItemPool->hasItem(rawurlencode($class));
3737
}
3838

3939
/**
4040
* {@inheritdoc}
4141
*/
4242
public function read($class)
4343
{
44-
$item = $this->cacheItemPool->getItem($this->escapeClassName($class));
44+
$item = $this->cacheItemPool->getItem(rawurlencode($class));
4545

4646
if (!$item->isHit()) {
4747
return false;
@@ -55,17 +55,9 @@ public function read($class)
5555
*/
5656
public function write(ClassMetadata $metadata)
5757
{
58-
$item = $this->cacheItemPool->getItem($this->escapeClassName($metadata->getClassName()));
58+
$item = $this->cacheItemPool->getItem(rawurlencode($metadata->getClassName()));
5959
$item->set($metadata);
6060

6161
$this->cacheItemPool->save($item);
6262
}
63-
64-
/**
65-
* Replaces backslashes by dots in a class name.
66-
*/
67-
private function escapeClassName(string $class): string
68-
{
69-
return rawurlencode($class);
70-
}
7163
}

0 commit comments

Comments
 (0)