Code Duplication    Length = 12-12 lines in 2 locations

Model/Authentication/UserProfile/UserInfo.php 2 locations

@@ 190-201 (lines=12) @@
187
     *
188
     * @return mixed
189
     */
190
    public function getAppMetadata($name, $default = null)
191
    {
192
        if (!isset($this->data['app_metadata'])) {
193
            return $default;
194
        }
195
196
        if (!array_key_exists($name, $this->data['app_metadata'])) {
197
            return $default;
198
        }
199
200
        return $this->data['app_metadata'][$name];
201
    }
202
203
    /**
204
     * @param string $name
@@ 209-220 (lines=12) @@
206
     *
207
     * @return mixed
208
     */
209
    public function getUserMetadata($name, $default = null)
210
    {
211
        if (!isset($this->data['user_metadata'])) {
212
            return $default;
213
        }
214
215
        if (!array_key_exists($name, $this->data['user_metadata'])) {
216
            return $default;
217
        }
218
219
        return $this->data['user_metadata'][$name];
220
    }
221
}
222