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
@@ 161-163 (lines=3) @@
158
            $key = self::SPI_CACHE_KEY_PREFIX;
159
        } elseif (!isset($key[1]) && is_array($key[0])) {
160
            $key = self::SPI_CACHE_KEY_PREFIX . '/' . implode('/', array_map([$this, 'washKey'], $key[0]));
161
        } else {
162
            $key = self::SPI_CACHE_KEY_PREFIX . '/' . implode('/', array_map([$this, 'washKey'], $key));
163
        }
164
165
        return $this->clearOrDefer([$key]);
166
    }