| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 75% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | abstract class StoreCommand extends DatabaseCommand implements StoreCommandInterface |
||
| 11 | { |
||
| 12 | protected array $columns = []; |
||
| 13 | |||
| 14 | protected array $appendix = []; |
||
| 15 | |||
| 16 | 2424 | public function __construct( |
|
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return array<string, mixed> Where Keys are DB filed names |
||
| 26 | */ |
||
| 27 | abstract public function getStoreData(): array; |
||
| 28 | |||
| 29 | 106 | public function registerColumn(string $key, mixed $value): void |
|
| 30 | { |
||
| 31 | 106 | $this->columns[$key] = $value; |
|
| 32 | } |
||
| 33 | |||
| 34 | 190 | public function registerAppendix(string $key, mixed $value): void |
|
| 35 | { |
||
| 36 | 190 | $this->appendix[$key] = $value; |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @internal |
||
| 41 | */ |
||
| 42 | public function setDatabase(?DatabaseInterface $db): void |
||
| 45 | } |
||
| 46 | } |
||
| 47 |