| Total Complexity | 4 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Set extends Clause |
||
| 8 | { |
||
| 9 | protected string $alterations = ''; |
||
| 10 | |||
| 11 | public function __construct(array $alterations) |
||
| 12 | { |
||
| 13 | parent::__construct(); |
||
| 14 | foreach ($alterations as $field_name => $value) { |
||
| 15 | $predicate = (new Predicate([$field_name], '='))->withValue($value, 'set_'.$field_name); |
||
| 16 | |||
| 17 | $this->alterations .= $predicate->__toString().','; |
||
| 18 | $this->bindings = array_merge($this->bindings, $predicate->bindings()); |
||
| 19 | } |
||
| 20 | } |
||
| 21 | |||
| 22 | public function __toString(): string |
||
| 25 | } |
||
| 26 | |||
| 27 | public function name(): string |
||
| 30 | } |
||
| 31 | } |