Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| InMemoryBookRepository | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| reset | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | // ╔════════════════════════════════════════════════════════════╗ |
| 4 | // ║ MIT Licence (#Expat) - https://opensource.org/licenses/MIT ║ |
| 5 | // ║ Copyright 2026 Frederic Poeydomenge <dyno@phexium.com> ║ |
| 6 | // ╚════════════════════════════════════════════════════════════╝ |
| 7 | |
| 8 | declare(strict_types=1); |
| 9 | |
| 10 | namespace AppDemo\Library\Infrastructure; |
| 11 | |
| 12 | use AppDemo\Library\Infrastructure\Mapper\BookMapper; |
| 13 | use Phexium\Plugin\SqlDriver\Adapter\InMemoryDriver; |
| 14 | |
| 15 | final class InMemoryBookRepository extends AbstractBookRepository |
| 16 | { |
| 17 | public function __construct( |
| 18 | InMemoryDriver $driver, |
| 19 | BookMapper $mapper, |
| 20 | ) { |
| 21 | parent::__construct($driver, $mapper); |
| 22 | } |
| 23 | |
| 24 | public function reset(): void |
| 25 | { |
| 26 | $this->driver->reset(self::TABLE); |
| 27 | } |
| 28 | } |