Форматирование

This commit is contained in:
brusnitsyn
2026-04-24 16:46:10 +09:00
parent fd0e6ee817
commit 63daa62888
87 changed files with 1380 additions and 791 deletions

View File

@@ -2,7 +2,6 @@
namespace App\Services;
use App\Models\Report;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
@@ -15,8 +14,7 @@ class MetrikaService
array $departmentIds,
string $startDate,
string $endDate
): array
{
): array {
if (empty($departmentIds)) {
return [];
}
@@ -44,8 +42,9 @@ class MetrikaService
$preoperativeDays = [];
foreach ($departmentIds as $deptId) {
if (!isset($results[$deptId]) || $results[$deptId]->isEmpty()) {
if (! isset($results[$deptId]) || $results[$deptId]->isEmpty()) {
$preoperativeDays[$deptId] = 0;
continue;
}
@@ -69,7 +68,8 @@ class MetrikaService
return $preoperativeDays;
} catch (\Exception $e) {
\Log::error("Error in calculatePreoperativeDaysFromSnapshots: " . $e->getMessage());
\Log::error('Error in calculatePreoperativeDaysFromSnapshots: '.$e->getMessage());
return array_fill_keys($departmentIds, 0);
}
}