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

@@ 287-294 (lines=8) @@
284
     *
285
     * @return string
286
     */
287
    final protected function escapeForCacheKey(string $identifier)
288
    {
289
        return \str_replace(
290
            ['_', '/', ':', '(', ')', '@', '\\', '{', '}'],
291
            ['__', '_S', '_C', '_BO', '_BC', '_A', '_BS', '_CBO', '_CBC'],
292
            $identifier
293
        );
294
    }
295
}
296