| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function doneCourses(): ?array |
||
| 21 | { |
||
| 22 | $courses = new Course(); |
||
| 23 | $studentCourse = new StudentCourse(); |
||
| 24 | |||
| 25 | return $this |
||
| 26 | ->select("*, students.name as student_name") |
||
| 27 | ->join( |
||
| 28 | $studentCourse, |
||
| 29 | "students.id", "=", "student_course.idstudent" |
||
| 30 | ) |
||
| 31 | ->join( |
||
| 32 | $courses, |
||
| 33 | "courses.id", "=", "student_course.idcourse" |
||
| 34 | ) |
||
| 35 | ->where( |
||
| 36 | "student_course.idstudent = :id", |
||
| 37 | "id={$this->id}" |
||
|
|
|||
| 38 | ) |
||
| 39 | ->fetch(true); |
||
| 40 | } |
||
| 41 | } |