Total Complexity | 5 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
21 | trait Model |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * @inheritDoc |
||
26 | */ |
||
27 | public function get(?int $returnType = self::TYPE_ARRAY) |
||
|
|||
28 | { |
||
29 | return ($returnType == self::TYPE_OBJECT) ? $this->getOrmModel()->find_many() : $this->getOrmModel()->find_array(); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @inheritDoc |
||
34 | */ |
||
35 | public function create(): object |
||
36 | { |
||
37 | return $this->getOrmModel()->create(); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @inheritDoc |
||
42 | */ |
||
43 | public function save(): bool |
||
44 | { |
||
45 | return $this->getOrmModel()->save(); |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @inheritDoc |
||
50 | */ |
||
51 | public function delete(): bool |
||
54 | } |
||
55 | |||
56 | } |