Форматирование
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user