| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function share($sid, $uid) |
||
| 22 | { |
||
| 23 | $basic=DB::table($this->tableName)->where(['sid'=>$sid, 'uid'=>$uid])->first(); |
||
| 24 | if (empty($basic)) { |
||
| 25 | return []; |
||
| 26 | } |
||
| 27 | DB::table($this->tableName)->where(['sid'=>$sid])->update([ |
||
| 28 | "share"=>$basic["share"] ? 0 : 1 |
||
| 29 | ]); |
||
| 30 | return [ |
||
| 31 | "share"=>$basic["share"] ? 0 : 1 |
||
| 32 | ]; |
||
| 61 |