Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Core\Engine\Domain\Repository; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | /** |
| 12 | * Interface for reading and saving inventory line items in dynamic inventory tables. |
| 13 | */ |
| 14 | interface InventoryRecordRepositoryInterface |
| 15 | { |
| 16 | /** |
| 17 | * Finds all line items for a specific parent record. |
| 18 | * |
| 19 | * @return array<int, array<string, mixed>> |
| 20 | */ |
| 21 | public function findItems(string $inventoryTable, int $recordId): array; |
| 22 | |
| 23 | /** |
| 24 | * Replaces or saves line items for a parent record. |
| 25 | * |
| 26 | * @param array<int, array<string, mixed>> $items |
| 27 | */ |
| 28 | public function saveItems(string $inventoryTable, int $recordId, array $items, int $owner = 1): void; |
| 29 | |
| 30 | /** |
| 31 | * Deletes a single line item by ID. |
| 32 | */ |
| 33 | public function deleteItem(string $inventoryTable, int $itemId): bool; |
| 34 | } |