| Conditions | 5 |
| Paths | 12 |
| Total Lines | 23 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 36 | public function update(Request $request, $id, $action) |
||
|
1 ignored issue
–
show
|
|||
| 37 | { |
||
| 38 | |||
| 39 | $notification = Notification::find($id); |
||
| 40 | $enable = strpos($action, 'un') === false; |
||
| 41 | if(!$enable) { |
||
| 42 | $action = substr($action, 2); |
||
| 43 | } |
||
| 44 | |||
| 45 | if ($action == 'read') { |
||
| 46 | $result = $notification->markRead($enable); |
||
| 47 | } |
||
| 48 | elseif ($action == 'sticky') { |
||
| 49 | $result = $notification->markSticky(false); |
||
| 50 | } |
||
| 51 | |||
| 52 | if ($result === false) { |
||
| 53 | return $this->response->errorInternal(); |
||
| 54 | } |
||
| 55 | else { |
||
| 56 | return $this->response->array(array('statusText'=>'OK')); |
||
| 57 | } |
||
| 58 | } |
||
| 59 | |||
| 61 |
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.