| Conditions | 8 |
| Paths | 6 |
| Total Lines | 31 |
| Code Lines | 17 |
| Lines | 14 |
| Ratio | 45.16 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 36 | public function update(Request $request, $id, $action) |
||
| 37 | { |
||
| 38 | if ($action === 'read' || $action === 'sticky') |
||
| 39 | { |
||
| 40 | if (NotificationAttrib::where('notifications_id', $id)->delete() >= 0) |
||
| 41 | { |
||
| 42 | $read = new NotificationAttrib; |
||
| 43 | $read->notifications_id = $id; |
||
| 44 | $read->user_id = $request->user()->user_id; |
||
| 45 | $read->key = $action; |
||
| 46 | $read->value = 1; |
||
| 47 | View Code Duplication | if ($read->save()) |
|
| 48 | { |
||
| 49 | return $this->response->array(array('statusText'=>'OK')); |
||
| 50 | } |
||
| 51 | else { |
||
| 52 | return $this->response->errorInternal(); |
||
| 53 | } |
||
| 54 | } |
||
| 55 | } |
||
| 56 | elseif ($action === 'unread' || $action === 'unsticky') |
||
| 57 | { |
||
| 58 | View Code Duplication | if (NotificationAttrib::where('notifications_id', $id)->delete() >= 0) |
|
| 59 | { |
||
| 60 | return $this->response->array(array('statusText'=>'OK')); |
||
| 61 | } |
||
| 62 | else { |
||
| 63 | return $this->response->errorInternal(); |
||
| 64 | } |
||
| 65 | } |
||
| 66 | } |
||
| 67 | |||
| 69 |
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.