| Total Complexity | 5 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 8 | class TestTableTwoRepository extends AbstractRepository |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @param null|int $id |
||
| 12 | * |
||
| 13 | * @return TestTableTwoEntity |
||
| 14 | */ |
||
| 15 | public function create(?int $id) |
||
| 16 | { |
||
| 17 | $testTableTwoEntity = (new TestTableTwoEntity())->setId($id); |
||
| 18 | |||
| 19 | $this |
||
| 20 | ->createQueryBuilder($testTableTwoEntity) |
||
| 21 | ->insert() |
||
| 22 | ; |
||
| 23 | |||
| 24 | return $testTableTwoEntity; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return TestTableTwoEntity[] |
||
| 29 | */ |
||
| 30 | public function read() |
||
| 31 | { |
||
| 32 | return $this->createQueryBuilder()->find(); |
||
|
|
|||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return int |
||
| 37 | */ |
||
| 38 | public function readCount() |
||
| 39 | { |
||
| 40 | return $this->createQueryBuilder()->count(); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param TestTableTwoEntity $testTableTwoEntity |
||
| 45 | */ |
||
| 46 | public function deleteEntity(TestTableTwoEntity $testTableTwoEntity) |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | protected function getEntityClass(): string |
||
| 59 |