diff --git a/src/Controllers/TeacherTimetableController.php b/src/Controllers/TeacherTimetableController.php index 90c4fdb..7e94336 100644 --- a/src/Controllers/TeacherTimetableController.php +++ b/src/Controllers/TeacherTimetableController.php @@ -5,7 +5,6 @@ use spkm\isams\Endpoint; use spkm\isams\TimetableControllerTrait; - /** * Class PupilTimetableController. */ diff --git a/src/Wrappers/Lesson.php b/src/Wrappers/Lesson.php index 9e497f2..71d8b82 100644 --- a/src/Wrappers/Lesson.php +++ b/src/Wrappers/Lesson.php @@ -20,7 +20,7 @@ protected function handle(): void { if (isset($this->employeeId)) { unset($this->employeeId); - $this->teacher = $this->employeeTitle.' '.$this->employeeSurname; + $this->teacher = $this->employeeTitle . ' ' . $this->employeeSurname; unset($this->employeeTitle); unset($this->employeeSurname); } else { @@ -28,9 +28,11 @@ protected function handle(): void $this->pupils = $this->getPupilsInSet($this->id); } } + private function getPupilsInSet(int $setId): Collection { $api = new RoughAndReadyController(\App\School::find(2)); - return collect($api->get('teaching/sets/'.$setId.'/setList')->students)->pluck('schoolId'); + + return collect($api->get('teaching/sets/' . $setId . '/setList')->students)->pluck('schoolId'); } }