Code Duplication    Length = 11-11 lines in 2 locations

Apps/ActiveRecord/ProfileField.php 2 locations

@@ 43-53 (lines=11) @@
40
     * @param int $id
41
     * @return array|null|string
42
     */
43
    public static function getNameById($id)
44
    {
45
        $all = self::getAll();
46
47
        $record = $all->find($id);
48
        if ($record === null || $record === false) {
49
            return null;
50
        }
51
52
        return Serialize::getDecodeLocale($record->name);
53
    }
54
55
    /**
56
     * Get field type by field id
@@ 60-70 (lines=11) @@
57
     * @param int $id
58
     * @return array|null|string
59
     */
60
    public static function getTypeById($id)
61
    {
62
        $all = self::getAll();
63
64
        $record = $all->find($id);
65
        if ($record === null || $record === false) {
66
            return null;
67
        }
68
69
        return $record->type;
70
    }
71
72
}