Lines
100.00%
3 / 3
Methods
100.00%
3 / 3
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| db | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| table | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 26 | abstract class AbstractRepository | |
| 27 | { | |
| 28 | public function __construct( | |
| 29 | protected readonly Configuration $configuration, | |
| 30 | ) { | |
| 31 | } | |
| 32 | ||
| 33 | protected function db(): DatabaseDriver | |
| 34 | { | |
| 35 | return $this->configuration->getDb(); | |
| 36 | } | |
| 37 | ||
| 38 | protected function table(string $tableName): string | |
| 39 | { | |
| 40 | return Database::getTablePrefix() . $tableName; | |
| 41 | } | |
| 42 | } |