Skip to content

Commit

Permalink
Merge pull request #45 from cranleighschool/analysis-22Z9G9
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
fredbradley authored Aug 12, 2022
2 parents 6ec5b16 + 7401c7f commit 23320f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/Controllers/TeacherTimetableController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use spkm\isams\Endpoint;
use spkm\isams\TimetableControllerTrait;


/**
* Class PupilTimetableController.
*/
Expand Down
6 changes: 4 additions & 2 deletions src/Wrappers/Lesson.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@ 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 {
// Must be a teacher...
$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');
}
}

0 comments on commit 23320f6

Please sign in to comment.