| Conditions | 4 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 29 | public function name(string $name, string $on_conflict = null, string $conflict_target = null):Statement{ |
||
| 30 | $this->name = trim($name); |
||
| 31 | $on_conflict = trim(strtoupper($on_conflict)); |
||
|
|
|||
| 32 | $conflict_target = trim(strtoupper($conflict_target)); |
||
| 33 | |||
| 34 | if(empty($this->name)){ |
||
| 35 | throw new QueryException('no name specified'); |
||
| 36 | } |
||
| 37 | |||
| 38 | if(!empty($on_conflict)){ |
||
| 39 | $this->on_conflict = $on_conflict; |
||
| 40 | } |
||
| 41 | |||
| 42 | if(!empty($conflict_target)){ |
||
| 43 | $this->conflict_target = $conflict_target; |
||
| 44 | } |
||
| 45 | |||
| 46 | return $this; |
||
| 47 | } |
||
| 50 |