| Total Complexity | 6 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 13.33% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class ProductRepository extends BaseRepository |
||
| 11 | { |
||
| 12 | protected string $endpoint = ResourceNames::PRODUCT; |
||
| 13 | protected string $model = Product::class; |
||
| 14 | |||
| 15 | // region Sorts |
||
| 16 | |||
| 17 | public function sortById(bool $descending = false): self |
||
| 20 | } |
||
| 21 | |||
| 22 | public function sortByName(bool $descending = false): self |
||
| 25 | } |
||
| 26 | |||
| 27 | // endregion |
||
| 28 | |||
| 29 | // region Filters |
||
| 30 | |||
| 31 | public function findByName(string $name): self |
||
| 32 | { |
||
| 33 | $this->filters['name'] = $name; |
||
| 34 | |||
| 35 | return $this; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function findByCode(string $code): self |
||
| 43 | } |
||
| 44 | |||
| 45 | // endregion |
||
| 46 | |||
| 47 | // region Includes |
||
| 48 | |||
| 49 | public function includeCategory(): self |
||
| 54 | } |
||
| 55 | |||
| 56 | // endregion |
||
| 57 | |||
| 58 | // region Meta |
||
| 59 | |||
| 60 | 1 | protected static function createMeta(array $meta): BaseMeta |
|
| 63 | } |
||
| 64 | |||
| 67 |