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

@@ 83-94 (lines=12) @@
80
     *
81
     * @param string $key
82
     */
83
    public function setKey($key)
84
    {
85
        $this->hash = null;
86
87
        if (empty($key)) {
88
            $this->key = null;
89
            return;
90
        }
91
92
        $this->key = (string) $key;
93
        $this->hash = $this->makeHash($key);
94
    }
95
96
97
    /**