Code Duplication    Length = 8-8 lines in 2 locations

src/Storage/FileStorage.php 2 locations

@@ 56-63 (lines=8) @@
53
    /**
54
     * @param Password $password
55
     */
56
    public function insert(Password $password)
57
    {
58
        if (file_exists($this->getFileName($password))) {
59
            throw new PhPsstException('The ID already exists', PhPsstException::ID_IS_ALREADY_TAKEN);
60
        }
61
62
        $this->writeFile($password);
63
    }
64
65
    /**
66
     * @param Password $password
@@ 68-75 (lines=8) @@
65
    /**
66
     * @param Password $password
67
     */
68
    public function update(Password $password)
69
    {
70
        if (!file_exists($this->getFileName($password))) {
71
            throw new PhPsstException('No such ID exists', PhPsstException::NO_PASSWORD_WITH_ID_FOUND);
72
        }
73
74
        $this->writeFile($password);
75
    }
76
77
    /**
78
     * @param $key