Code Duplication    Length = 6-6 lines in 2 locations

app/Itil/Controllers/UtilityController.php 1 location

@@ 143-148 (lines=6) @@
140
        return $relation;
141
    }
142
143
    public static function getRelationOfAsset($table, $id) {
144
        $relations = new \App\Itil\Models\Common\AssetRelation();
145
        $owner = "$table:$id";
146
        $relation = $relations->where('owner', $owner)->first();
147
        return $relation;
148
    }
149
150
    public static function getSubjectByThreadId($threadid) {
151
        $threads = new \App\Model\helpdesk\Ticket\Ticket_Thread();

app/Plugins/ServiceDesk/Controllers/Library/UtilityController.php 1 location

@@ 137-142 (lines=6) @@
134
        return $relation;
135
    }
136
137
    public static function getRelationOfAsset($table, $id) {
138
        $relations = new \App\Plugins\ServiceDesk\Model\Common\AssetRelation();
139
        $owner = "$table:$id";
140
        $relation = $relations->where('owner', $owner)->first();
141
        return $relation;
142
    }
143
144
    public static function getSubjectByThreadId($threadid) {
145
        $threads = new \App\Model\helpdesk\Ticket\Ticket_Thread();