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