| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | 8 | public function compileUpsert(Builder $query, array $values, array $target, array $update) |
|
|
|
|||
| 23 | { |
||
| 24 | 8 | $sql = $this->compileInsert($query, $values).' on duplicate key update '; |
|
| 25 | |||
| 26 | 8 | $columns = collect($update)->map(function ($value, $key) { |
|
| 27 | 8 | return is_numeric($key) |
|
| 28 | 7 | ? $this->wrap($value).' = values('.$this->wrap($value).')' |
|
| 29 | 8 | : $this->wrap($key).' = '.$this->parameter($value); |
|
| 30 | 8 | })->implode(', '); |
|
| 31 | |||
| 32 | 8 | return $sql.$columns; |
|
| 33 | } |
||
| 50 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.