| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | public function studentsThatFinished(): ?array |
||
| 39 | { |
||
| 40 | $students = new Student(); |
||
| 41 | $studentCourse = new StudentCourse(); |
||
| 42 | |||
| 43 | return $this |
||
| 44 | ->select() |
||
| 45 | ->join( |
||
| 46 | $studentCourse, |
||
| 47 | "courses.id", "=", "student_course.idcourse" |
||
| 48 | ) |
||
| 49 | ->join( |
||
| 50 | $students, |
||
| 51 | "students.id", "=", "student_course.idstudent" |
||
| 52 | ) |
||
| 53 | ->where( |
||
| 54 | "courses.id = :id", |
||
| 55 | "id={$this->id}" |
||
| 56 | ) |
||
| 57 | ->fetch(true); |
||
| 58 | } |
||
| 59 | } |