Code Duplication    Length = 6-6 lines in 2 locations

api/v1/class.ShiftAPI.php 2 locations

@@ 206-211 (lines=6) @@
203
            }
204
            return $response->withJSON($dataTable->update($filter, $entity));
205
        }
206
        if(isset($entity['available']) && $entity['available'])
207
        {
208
            $entity['participant'] = $this->user->uid;
209
            $entity['status'] = 'filled';
210
            return $response->withJSON($dataTable->update($filter, $entity));
211
        }
212
        if(isset($entity['status']) && $entity['status'] === 'groupPending')
213
        {
214
            $entity['participant'] = $this->user->uid;
@@ 212-217 (lines=6) @@
209
            $entity['status'] = 'filled';
210
            return $response->withJSON($dataTable->update($filter, $entity));
211
        }
212
        if(isset($entity['status']) && $entity['status'] === 'groupPending')
213
        {
214
            $entity['participant'] = $this->user->uid;
215
            $entity['status'] = 'filled';
216
            return $response->withJSON($dataTable->update($filter, $entity));
217
        }
218
        print_r($entity); die();
219
    }
220