Code Duplication    Length = 6-6 lines in 2 locations

api/v1/class.ShiftAPI.php 2 locations

@@ 263-268 (lines=6) @@
260
            }
261
            return $response->withJSON($dataTable->update($filter, $entity));
262
        }
263
        if(isset($entity['available']) && $entity['available'])
264
        {
265
            $entity['participant'] = $this->user->uid;
266
            $entity['status'] = 'filled';
267
            return $response->withJSON($dataTable->update($filter, $entity));
268
        }
269
        if(isset($entity['status']) && $entity['status'] === 'groupPending')
270
        {
271
            $entity['participant'] = $this->user->uid;
@@ 269-274 (lines=6) @@
266
            $entity['status'] = 'filled';
267
            return $response->withJSON($dataTable->update($filter, $entity));
268
        }
269
        if(isset($entity['status']) && $entity['status'] === 'groupPending')
270
        {
271
            $entity['participant'] = $this->user->uid;
272
            $entity['status'] = 'filled';
273
            return $response->withJSON($dataTable->update($filter, $entity));
274
        }
275
        print_r($entity); die();
276
    }
277