Code Duplication    Length = 12-12 lines in 2 locations

src/Palladium/Entity/CookieIdentity.php 1 location

@@ 62-73 (lines=12) @@
59
     *
60
     * @param string $key
61
     */
62
    public function setKey($key)
63
    {
64
        $this->hash = null;
65
66
        if (empty($key)) {
67
            $this->key = null;
68
            return;
69
        }
70
71
        $this->key = (string) $key;
72
        $this->hash = $this->makeHash($key);
73
    }
74
75
76
    /**

src/Palladium/Entity/OneTimeIdentity.php 1 location

@@ 74-85 (lines=12) @@
71
     *
72
     * @param string $key
73
     */
74
    public function setKey($key)
75
    {
76
        $this->hash = null;
77
78
        if (empty($key)) {
79
            $this->key = null;
80
            return;
81
        }
82
83
        $this->key = (string) $key;
84
        $this->hash = $this->makeHash($key);
85
    }
86
87
88
    public function setHash($hash)