Code Duplication    Length = 11-12 lines in 2 locations

src/Constructors/UserField.php 2 locations

@@ 40-51 (lines=12) @@
37
     * @param $id
38
     * @throws \Exception
39
     */
40
    public function update($id)
41
    {
42
        $uf = new \CUserTypeEntity();
43
        $result = $uf->Update($id, $this->fields);
44
45
        if (!$result) {
46
            global $APPLICATION;
47
            throw new \Exception($APPLICATION->GetException());
48
        }
49
50
        Logger::log("Обновлен UF {$id}", Logger::COLOR_GREEN);
51
    }
52
53
    /**
54
     * Удалить UF
@@ 58-68 (lines=11) @@
55
     * @param $id
56
     * @throws \Exception
57
     */
58
    public static function delete($id)
59
    {
60
        $result = (new \CUserTypeEntity())->Delete($id);
61
62
        if (!$result) {
63
            global $APPLICATION;
64
            throw new \Exception($APPLICATION->GetException());
65
        }
66
67
        Logger::log("Удален UF {$id}", Logger::COLOR_GREEN);
68
    }
69
70
    /**
71
     * Установить настройки для добавления UF по умолчанию