fix gitlab tests
This commit is contained in:
@@ -42,7 +42,7 @@ class CompetitionScoresQueryService
|
||||
|
||||
public function getQuestionCounts(array $competitionIds, int $classSectionId): array
|
||||
{
|
||||
if (! $this->hasQuestionCount() || empty($competitionIds)) {
|
||||
if (!$this->hasQuestionCount() || empty($competitionIds)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ class CompetitionScoresQueryService
|
||||
|
||||
public function getQuestionCountForCompetition(int $competitionId, int $classSectionId): ?int
|
||||
{
|
||||
if (! $this->hasQuestionCount()) {
|
||||
if (!$this->hasQuestionCount()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ class CompetitionScoresRosterService
|
||||
}
|
||||
|
||||
$row = (array) $builder->first();
|
||||
|
||||
return (int) ($row['total'] ?? 0);
|
||||
}
|
||||
|
||||
@@ -47,7 +46,7 @@ class CompetitionScoresRosterService
|
||||
|
||||
$builder = DB::table('students as s')
|
||||
->select('s.id', 's.school_id', 's.firstname', 's.lastname')
|
||||
->join($this->classStudentTable.' as cs', 'cs.student_id', '=', 's.id')
|
||||
->join($this->classStudentTable . ' as cs', 'cs.student_id', '=', 's.id')
|
||||
->where('cs.class_section_id', $classSectionId);
|
||||
|
||||
if (Schema::hasColumn($this->classStudentTable, 'school_year')) {
|
||||
|
||||
@@ -16,9 +16,8 @@ class CompetitionScoresSaveService
|
||||
if ($scoreValue === '') {
|
||||
continue;
|
||||
}
|
||||
if (! preg_match('/^\\d+$/', $scoreValue)) {
|
||||
if (!preg_match('/^\\d+$/', $scoreValue)) {
|
||||
$invalidScores[] = (int) $studentId;
|
||||
|
||||
continue;
|
||||
}
|
||||
$cleanScores[(int) $studentId] = (int) $scoreValue;
|
||||
|
||||
Reference in New Issue
Block a user