| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function studentsWhoPrefer(): ?array |
||
| 21 | { |
||
| 22 | $students = new Student(); |
||
| 23 | return $this |
||
| 24 | ->select("*, courses.name as course_name") |
||
| 25 | ->join( |
||
| 26 | $students, |
||
| 27 | 'courses.id', '=', 'students.preferred_course') |
||
| 28 | ->where( |
||
| 29 | 'courses.id = :id', |
||
| 30 | "id={$this->id}") |
||
|
|
|||
| 31 | ->limit(5) |
||
| 32 | ->fetch(true); |
||
| 33 | } |
||
| 59 | } |