Code Duplication    Length = 8-8 lines in 2 locations

app/Api/Transformers/EmployeeTransformer.php 2 locations

@@ 304-311 (lines=8) @@
301
     *
302
     * @author Bertrand Kintanar <[email protected]>
303
     */
304
    public function includeSupervisors(Employee $employee, ParamBag $params = null)
305
    {
306
        $supervisors = $employee->supervisors()->pluck('supervisor_id')->toArray();
307
308
        $supervisors = $employee->whereIn('id', $supervisors);
309
310
        return $this->transformCollection($supervisors, new EmployeeTransformer(), $params);
311
    }
312
313
    /**
314
     * Include Subordinates.
@@ 325-332 (lines=8) @@
322
     *
323
     * @author Bertrand Kintanar <[email protected]>
324
     */
325
    public function includeSubordinates(Employee $employee, ParamBag $params = null)
326
    {
327
        $subordinates = $employee->subordinates()->pluck('employee_id')->toArray();
328
329
        $subordinates = $employee->whereIn('id', $subordinates);
330
331
        return $this->transformCollection($subordinates, new EmployeeTransformer(), $params);
332
    }
333
}
334