Fix Laravel Pint formatting

This commit is contained in:
root
2026-06-09 00:03:03 -04:00
parent 8d4d610b82
commit b5fd4a4ca1
1414 changed files with 11317 additions and 10201 deletions
+25 -17
View File
@@ -2,8 +2,6 @@
namespace App\Models;
use App\Models\BaseModel;
class Participation extends BaseModel
{
protected $table = 'participation';
@@ -33,19 +31,19 @@ class Participation extends BaseModel
];
protected $casts = [
'student_id' => 'integer',
'school_id' => 'integer',
'student_id' => 'integer',
'school_id' => 'integer',
'class_section_id' => 'integer',
'updated_by' => 'integer',
'updated_by' => 'integer',
// score is numeric; change to 'integer' if it is whole number
'score' => 'decimal:2',
'max_points' => 'decimal:2',
'locked_by' => 'integer',
'locked_at' => 'datetime',
'score' => 'decimal:2',
'max_points' => 'decimal:2',
'locked_by' => 'integer',
'locked_at' => 'datetime',
'created_at' => 'datetime',
'updated_at' => 'datetime',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
/* Optional relationships */
@@ -80,15 +78,25 @@ class Participation extends BaseModel
}
$row = $q->first();
if (!$row) return null;
if (! $row) {
return null;
}
$score = $row->score;
if ($score === null) return null;
if (is_string($score) && trim($score) === '') return null;
if ($score === '') return null;
if (!is_numeric($score)) return null;
if ($score === null) {
return null;
}
if (is_string($score) && trim($score) === '') {
return null;
}
if ($score === '') {
return null;
}
if (! is_numeric($score)) {
return null;
}
return (float) $score;
}
}
}