Code Duplication    Length = 3-3 lines in 2 locations

app/Drivers/Redis/RedisDatabaseAliasStorage.php 2 locations

@@ 42-44 (lines=3) @@
39
40
    public function check()
41
    {
42
        if (!is_writeable($this->baseDirname)) {
43
            throw new Exception($this->translator->translate('redis.alias_storage_not_writable', ['directory' => $this->baseDirname]));
44
        }
45
        $dirname = $this->baseDirname . '/' . $this->savesDirname;
46
        if (!file_exists($dirname)) {
47
            mkdir($dirname, 0777, true);
@@ 49-51 (lines=3) @@
46
        if (!file_exists($dirname)) {
47
            mkdir($dirname, 0777, true);
48
        }
49
        if (!file_exists($dirname)) {
50
            throw new Exception($this->translator->translate('redis.alias_storage_not_writable', ['directory' => $this->baseDirname]));
51
        }
52
        return true;
53
    }
54