Code Duplication    Length = 6-6 lines in 2 locations

api/v1/class.ShiftAPI.php 2 locations

@@ 234-239 (lines=6) @@
231
            }
232
            return $response->withJSON($dataTable->update($filter, $entity));
233
        }
234
        if(isset($entity['available']) && $entity['available'])
235
        {
236
            $entity['participant'] = $this->user->uid;
237
            $entity['status'] = 'filled';
238
            return $response->withJSON($dataTable->update($filter, $entity));
239
        }
240
        if(isset($entity['status']) && $entity['status'] === 'groupPending')
241
        {
242
            $entity['participant'] = $this->user->uid;
@@ 240-245 (lines=6) @@
237
            $entity['status'] = 'filled';
238
            return $response->withJSON($dataTable->update($filter, $entity));
239
        }
240
        if(isset($entity['status']) && $entity['status'] === 'groupPending')
241
        {
242
            $entity['participant'] = $this->user->uid;
243
            $entity['status'] = 'filled';
244
            return $response->withJSON($dataTable->update($filter, $entity));
245
        }
246
        print_r($entity); die();
247
    }
248