| 1 | <?php namespace App\Modules\Notifications\Repositories; |
||
| 5 | class NotificationRepository extends AbstractRepository |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Return the model full namespace. |
||
| 9 | * |
||
| 10 | * @return string |
||
| 11 | */ |
||
| 12 | protected function getModel() |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Set the notification notified to true. |
||
| 20 | * |
||
| 21 | * @param integer $id |
||
| 22 | * @return object |
||
| 23 | */ |
||
| 24 | public function notified($id) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Set the notification notified to all. |
||
| 31 | * |
||
| 32 | * @return void |
||
| 33 | */ |
||
| 34 | public function notifyAll() |
||
| 38 | } |
||
| 39 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.