Code Duplication    Length = 6-6 lines in 2 locations

api/v1/class.ShiftAPI.php 2 locations

@@ 243-248 (lines=6) @@
240
            }
241
            return $response->withJSON($dataTable->update($filter, $entity));
242
        }
243
        if(isset($entity['available']) && $entity['available'])
244
        {
245
            $entity['participant'] = $this->user->uid;
246
            $entity['status'] = 'filled';
247
            return $response->withJSON($dataTable->update($filter, $entity));
248
        }
249
        if(isset($entity['status']) && $entity['status'] === 'groupPending')
250
        {
251
            $entity['participant'] = $this->user->uid;
@@ 249-254 (lines=6) @@
246
            $entity['status'] = 'filled';
247
            return $response->withJSON($dataTable->update($filter, $entity));
248
        }
249
        if(isset($entity['status']) && $entity['status'] === 'groupPending')
250
        {
251
            $entity['participant'] = $this->user->uid;
252
            $entity['status'] = 'filled';
253
            return $response->withJSON($dataTable->update($filter, $entity));
254
        }
255
        print_r($entity); die();
256
    }
257