Code Duplication    Length = 3-3 lines in 2 locations

src/base/Security.php 2 locations

@@ 123-125 (lines=3) @@
120
    public static function save($user)
121
    {
122
        $admins = array();
123
        if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) {
124
            $admins = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json'), TRUE);
125
        }
126
        $admins[$user['username']]['hash'] = sha1($user['username'] . $user['password']);
127
        $admins[$user['username']]['profile'] = $user['profile'];
128
@@ 163-165 (lines=3) @@
160
    public function getAdmins()
161
    {
162
        $admins = array();
163
        if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) {
164
            $admins = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json'), TRUE);
165
        }
166
167
        return $admins;
168
    }