Code Duplication    Length = 7-7 lines in 2 locations

src/Gaufrette/Adapter/Local.php 2 locations

@@ 70-76 (lines=7) @@
67
     * @throws \InvalidArgumentException if the directory already exists
68
     * @throws \RuntimeException         if the directory could not be created
69
     */
70
    public function write($key, $content)
71
    {
72
        $path = $this->computePath($key);
73
        $this->ensureDirectoryExists(\Gaufrette\Util\Path::dirname($path), true);
74
75
        return file_put_contents($path, $content);
76
    }
77
78
    /**
79
     * {@inheritdoc}
@@ 85-91 (lines=7) @@
82
     * @throws \InvalidArgumentException if the directory already exists
83
     * @throws \RuntimeException         if the directory could not be created
84
     */
85
    public function rename($sourceKey, $targetKey)
86
    {
87
        $targetPath = $this->computePath($targetKey);
88
        $this->ensureDirectoryExists(\Gaufrette\Util\Path::dirname($targetPath), true);
89
90
        return rename($this->computePath($sourceKey), $targetPath);
91
    }
92
93
    /**
94
     * {@inheritdoc}