Total Complexity | 8 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | trait Result |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * @inheritDoc |
||
26 | */ |
||
27 | public function findOne(int $id): object |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @inheritDoc |
||
35 | */ |
||
36 | public function findOneBy(string $column, $value): object |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @inheritDoc |
||
44 | */ |
||
45 | public function first(): object |
||
46 | { |
||
47 | $result = $this->getOrmModel()->find_one(); |
||
48 | return $result ?: $this->getOrmModel(); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @inheritDoc |
||
53 | */ |
||
54 | public function count(): int |
||
55 | { |
||
56 | return $this->getOrmModel()->count(); |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * @inheritDoc |
||
61 | */ |
||
62 | public function asArray(): array |
||
65 | } |
||
66 | |||
67 | } |