| Total Complexity | 3 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class CharacteristicsRepositorySql implements CharacteristicsRepository |
||
| 11 | { |
||
| 12 | public function getByType(string $type, bool $isMain): array |
||
| 13 | { |
||
| 14 | $list = CharacteristicsModel::query() |
||
| 15 | ->where('type', $type) |
||
| 16 | ->where('main', $isMain) |
||
| 17 | ->orderBy('priority') |
||
| 18 | ->get(); |
||
| 19 | return $list->toArray(); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * only used for ti test |
||
| 24 | * @param array $cs |
||
| 25 | */ |
||
| 26 | public function add(array $cs) |
||
| 32 | } |
||
| 33 | } |
||
| 35 |