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

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