Code Duplication    Length = 6-6 lines in 2 locations

api/v1/class.ShiftAPI.php 2 locations

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