| Conditions | 8 |
| Paths | 6 |
| Total Lines | 31 |
| Code Lines | 17 |
| Lines | 14 |
| Ratio | 45.16 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 40 | public function update(Request $request, $id, $action) |
||
| 41 | { |
||
| 42 | if ($action === 'read' || $action === 'sticky') |
||
| 43 | { |
||
| 44 | if (NotificationAttrib::where('notifications_id', $id)->delete() >= 0) |
||
| 45 | { |
||
| 46 | $read = new NotificationAttrib; |
||
| 47 | $read->notifications_id = $id; |
||
| 48 | $read->user_id = $request->user()->user_id; |
||
| 49 | $read->key = $action; |
||
| 50 | $read->value = 1; |
||
| 51 | View Code Duplication | if ($read->save()) |
|
| 52 | { |
||
| 53 | return $this->response->array(array('statusText'=>'OK')); |
||
| 54 | } |
||
| 55 | else { |
||
| 56 | return $this->response->errorInternal(); |
||
| 57 | } |
||
| 58 | } |
||
| 59 | } |
||
| 60 | elseif ($action === 'unread' || $action === 'unsticky') |
||
| 61 | { |
||
| 62 | View Code Duplication | if (NotificationAttrib::where('notifications_id', $id)->delete() >= 0) |
|
| 63 | { |
||
| 64 | return $this->response->array(array('statusText'=>'OK')); |
||
| 65 | } |
||
| 66 | else { |
||
| 67 | return $this->response->errorInternal(); |
||
| 68 | } |
||
| 69 | } |
||
| 70 | } |
||
| 71 | |||
| 73 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.