| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | protected function execute() |
||
| 14 | { |
||
| 15 | $entityId = $this->entity->getPk(); |
||
| 16 | if (! $entityId) { |
||
| 17 | return; |
||
| 18 | } |
||
| 19 | |||
| 20 | $this->now = time(); |
||
| 21 | |||
| 22 | $update = new \Sirius\Sql\Update($this->mapper->getWriteConnection()); |
||
| 23 | $update->table($this->mapper->getTable()) |
||
| 24 | ->columns([ |
||
| 25 | $this->getOption('deleted_at_column') => $this->now |
||
| 26 | ]) |
||
| 27 | ->where('id', $entityId); |
||
| 28 | $update->perform(); |
||
| 29 | } |
||
| 39 |