| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 16 | public function getResolvedProblems(User $user) { |
||
| 17 | /** @var SolutionRepository $repository */ |
||
| 18 | $repository = app(SolutionRepository::class); |
||
| 19 | $repository->pushCriteria(new Where('user_id', $user->id)); |
||
| 20 | $repository->pushCriteria(new Where('result', Status::ACCEPT)); |
||
| 21 | $repository->pushCriteria(new Distinct('problem_id')); |
||
| 22 | return $repository->all('problem_id')->map(function ($item) { |
||
|
|
|||
| 23 | return $item->problem_id; |
||
| 24 | }); |
||
| 27 |