Code Duplication    Length = 3-3 lines in 2 locations

eZ/Publish/Core/Persistence/Cache/CacheServiceDecorator.php 2 locations

@@ 68-70 (lines=3) @@
65
        //  Upstream seems to no longer support array, so we flatten it
66
        if (!isset($args[1]) && is_array($args[0])) {
67
            $key = implode('/', array_map([$this, 'washKey'], $args[0]));
68
        } else {
69
            $key = '' . implode('/', array_map([$this, 'washKey'], $args));
70
        }
71
72
        $key = $key === '' ? self::SPI_CACHE_KEY_PREFIX : self::SPI_CACHE_KEY_PREFIX . '/' . $key;
73
@@ 162-164 (lines=3) @@
159
            $key = self::SPI_CACHE_KEY_PREFIX;
160
        } elseif (!isset($key[1]) && is_array($key[0])) {
161
            $key = self::SPI_CACHE_KEY_PREFIX . '/' . implode('/', array_map([$this, 'washKey'], $key[0]));
162
        } else {
163
            $key = self::SPI_CACHE_KEY_PREFIX . '/' . implode('/', array_map([$this, 'washKey'], $key));
164
        }
165
166
        return $this->rawClear([$key]);
167
    }