| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public function add($uri, $msg = self::MSG_DEFAULT, array $vars = null) |
||
| 39 | { |
||
| 40 | // save data into database |
||
| 41 | $record = new UserNotification(); |
||
| 42 | $record->user_id = $this->_targetId; |
||
|
|
|||
| 43 | $record->uri = $uri; |
||
| 44 | $record->msg = $msg; |
||
| 45 | if ($vars !== null) { |
||
| 46 | $record->vars = $vars; |
||
| 47 | } |
||
| 48 | |||
| 49 | $record->save(); |
||
| 50 | } |
||
| 52 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.