Skip to content

Commit

Permalink
add type to collection
Browse files Browse the repository at this point in the history
  • Loading branch information
Smol-An committed Feb 2, 2024
1 parent 34dc7c4 commit 48be11b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
GROUP BY url_id, status_code')
->fetchAll(PDO::FETCH_ASSOC);

$urls = collect($allUrls);
$urlChecks = collect($lastChecks)->keyBy('url_id');
$urls = collect((array) $allUrls);
$urlChecks = collect((array) $lastChecks)->keyBy('url_id');

$data = $urls->map(function ($url) use ($urlChecks) {
$urlCheck = $urlChecks->firstWhere('url_id', $url['id']);
Expand Down Expand Up @@ -216,7 +216,7 @@
$newCheckStmt = $this->get('connection')->prepare($newCheckQuery);
$newCheckStmt->execute([
':url_id' => $urlId,
':status_code' => $statusCode ?? null,
':status_code' => $statusCode,
':h1' => $h1 ?? null,
':title' => $title ?? null,
':description' => $description ?? null,
Expand Down

0 comments on commit 48be11b

Please sign in to comment.