Code Duplication    Length = 5-5 lines in 2 locations

assets/lib/MODxAPI/modResource.php 1 location

@@ 384-388 (lines=5) @@
381
        }
382
383
        if (!empty($this->set)) {
384
            if ($this->newDoc) {
385
                $SQL = "INSERT into {$this->makeTable('site_content')} SET " . implode(', ', $this->set);
386
            } else {
387
                $SQL = "UPDATE {$this->makeTable('site_content')} SET " . implode(', ', $this->set) . " WHERE `id` = " . $this->id;
388
            }
389
            $this->query($SQL);
390
391
            if ($this->newDoc) {

assets/lib/MODxAPI/modUsers.php 1 location

@@ 168-172 (lines=5) @@
165
            unset($fld[$key]);
166
        }
167
        if (!empty($this->set['user'])) {
168
            if ($this->newDoc) {
169
                $SQL = "INSERT into {$this->makeTable('web_users')} SET " . implode(', ', $this->set['user']);
170
            } else {
171
                $SQL = "UPDATE {$this->makeTable('web_users')} SET " . implode(', ', $this->set['user']) . " WHERE id = " . $this->id;
172
            }
173
            $this->query($SQL);
174
        }
175