Code Duplication    Length = 6-6 lines in 2 locations

api/v1/class.ShiftAPI.php 2 locations

@@ 278-283 (lines=6) @@
275
            }
276
            return $response->withJSON($dataTable->update($filter, $entity));
277
        }
278
        if(isset($entity['available']) && $entity['available'])
279
        {
280
            $entity['participant'] = $this->user->uid;
281
            $entity['status'] = 'filled';
282
            return $response->withJSON($dataTable->update($filter, $entity));
283
        }
284
        if(isset($entity['status']) && $entity['status'] === 'groupPending')
285
        {
286
            $entity['participant'] = $this->user->uid;
@@ 284-289 (lines=6) @@
281
            $entity['status'] = 'filled';
282
            return $response->withJSON($dataTable->update($filter, $entity));
283
        }
284
        if(isset($entity['status']) && $entity['status'] === 'groupPending')
285
        {
286
            $entity['participant'] = $this->user->uid;
287
            $entity['status'] = 'filled';
288
            return $response->withJSON($dataTable->update($filter, $entity));
289
        }
290
        print_r($entity); die();
291
    }
292