add tests batch 20

This commit is contained in:
root
2026-06-09 01:03:53 -04:00
parent 95efb9652e
commit 6be4875c5e
1502 changed files with 13797 additions and 11313 deletions
@@ -2,7 +2,6 @@
namespace App\Services\Attendance;
use Config\School;
use DateTimeImmutable;
use DateTimeZone;
@@ -10,7 +9,7 @@ class AttendanceAutoPublishService
{
public function timezone(?string $tzFromCfg = null): DateTimeZone
{
$tz = $tzFromCfg ?: (class_exists(School::class)
$tz = $tzFromCfg ?: (class_exists(\Config\School::class)
? (config('School')->attendance['timezone'] ?? null)
: null);
@@ -20,7 +19,7 @@ class AttendanceAutoPublishService
public function secondSundayAfterEndOfDay(string $ymd, ?string $tz = null): string
{
$zone = $this->timezone($tz);
$day = new DateTimeImmutable($ymd.' 00:00:00', $zone);
$day = new DateTimeImmutable($ymd . ' 00:00:00', $zone);
$weekday = (int) $day->format('w');
$daysToNextSunday = (7 - $weekday) % 7;