Code Duplication    Length = 9-11 lines in 2 locations

ConfigCache/RestorablePhpFileCache.php 2 locations

@@ 31-39 (lines=9) @@
28
     *
29
     * @param string $id
30
     */
31
    public function saveToTemp($id)
32
    {
33
        if ($this->contains($id)) {
34
            $data = $this->fetch($id);
35
            $this->prepareTemporaryDirectory();
36
            $this->save($id, $data);
37
            $this->restoreDirectory();
38
        }
39
    }
40
41
    /**
42
     * Restores the cache to the cache directory.
@@ 46-56 (lines=11) @@
43
     *
44
     * @param string $id
45
     */
46
    public function restore($id)
47
    {
48
        $this->prepareTemporaryDirectory();
49
        if ($this->contains($id)) {
50
            $data = $this->fetch($id);
51
            $this->restoreDirectory();
52
            $this->save($id, $data);
53
        } else {
54
            $this->restoreDirectory();
55
        }
56
    }
57
58
    /**
59
     * Sets a SaveAreaBuilder.