Code Duplication    Length = 8-8 lines in 2 locations

eZ/Publish/Core/Persistence/Cache/AbstractHandler.php 1 location

@@ 125-132 (lines=8) @@
122
        return $list;
123
    }
124
125
    final protected function escapeForCacheKey(string $identifier)
126
    {
127
        return \str_replace(
128
            ['_', '/', ':', '(', ')', '@', '\\', '{', '}'],
129
            ['__', '_S', '_C', '_BO', '_BC', '_A', '_BS', '_CBO', '_CBC'],
130
            $identifier
131
        );
132
    }
133
}
134

eZ/Publish/Core/Persistence/Cache/AbstractInMemoryHandler.php 1 location

@@ 272-279 (lines=8) @@
269
        return $list;
270
    }
271
272
    final protected function escapeForCacheKey(string $identifier)
273
    {
274
        return \str_replace(
275
            ['_', '/', ':', '(', ')', '@', '\\', '{', '}'],
276
            ['__', '_S', '_C', '_BO', '_BC', '_A', '_BS', '_CBO', '_CBC'],
277
            $identifier
278
        );
279
    }
280
}
281