Code Duplication    Length = 11-11 lines in 2 locations

api/v1/class.Processor.php 2 locations

@@ 98-108 (lines=11) @@
95
        return $uids[$uid];
96
    }
97
98
    protected function isUserDepartmentLead($departmentID, $user)
99
    {
100
        $dataTable = DataSetFactory::getDataTableByNames('fvs', 'departments');
101
        $filter = new \Data\Filter('departmentID eq '.$departmentID);
102
        $depts = $dataTable->read($filter);
103
        if(empty($depts))
104
        {
105
            return false;
106
        }
107
        return $this->isUserDepartmentLead2($depts[0], $user);
108
    }
109
110
    protected function isUserDepartmentLead2($dept, $user)
111
    {
@@ 161-171 (lines=11) @@
158
        return !in_array($deptId, $privateDepts);
159
    }
160
161
    protected function getParticipantProfile($uid)
162
    {
163
        $dataTable = DataSetFactory::getDataTableByNames('fvs', 'participants');
164
        $filter = new \Data\Filter("uid eq '$uid'");
165
        $profile = $dataTable->read($filter);
166
        if(empty($profile))
167
        {
168
            return null;
169
        }
170
        return $profile[0];
171
    }
172
173
    protected function processShift($entry)
174
    {