| 1 | <?php |
||
| 2 | namespace Kir\MySQL\Builder; |
||
| 3 | |||
| 4 | use Kir\MySQL\Builder\Internal\DDLPreparable; |
||
| 5 | use Kir\MySQL\Builder\Internal\DDLRunnable; |
||
| 6 | use Kir\MySQL\Builder\Traits\CreateDDLRunnable; |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @implements DDLPreparable<int> |
||
| 10 | */ |
||
| 11 | class RunnableDelete extends Delete implements DDLPreparable { |
||
| 12 | /** @use CreateDDLRunnable<int> */ |
||
| 13 | use CreateDDLRunnable; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param array<string, mixed> $params |
||
| 17 | * @return int |
||
| 18 | */ |
||
| 19 | public function run(array $params = []) { |
||
| 20 | return $this->prepare()->run($params); |
||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @return DDLRunnable<int> |
||
| 25 | */ |
||
| 26 | public function prepare(): DDLRunnable { |
||
| 27 | return $this->createPreparable( |
||
| 28 | $this->db()->prepare($this), |
||
| 29 | fn($v) => (int) $v |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | } |
||
| 33 |