| Total Complexity | 6 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | trait Model |
||
| 25 | { |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @inheritDoc |
||
| 29 | * @throws DatabaseException |
||
| 30 | */ |
||
| 31 | public function create(): DbalInterface |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @inheritDoc |
||
| 39 | * @throws DatabaseException |
||
| 40 | */ |
||
| 41 | public function prop(string $key, $value = null) |
||
| 42 | { |
||
| 43 | if (func_num_args() == 2) { |
||
| 44 | $this->getOrmModel()->$key = $value; |
||
| 45 | } else { |
||
| 46 | return $this->getOrmModel()->$key ?? null; |
||
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @inheritDoc |
||
| 52 | * @throws DatabaseException |
||
| 53 | */ |
||
| 54 | public function save(): bool |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @inheritDoc |
||
| 61 | * @throws DatabaseException |
||
| 62 | */ |
||
| 63 | public function delete(): bool |
||
| 64 | { |
||
| 65 | return $this->getOrmModel()->delete(); |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @inheritDoc |
||
| 70 | * @throws DatabaseException |
||
| 71 | */ |
||
| 72 | public function deleteMany(): bool |
||
| 75 | } |
||
| 76 | } |