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

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