From 0049077605ca4ab56b8bc2ef5bae7023e6239b80 Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Thu, 26 Mar 2026 11:03:15 +0100 Subject: [PATCH] Add type annotations to fix Intelephense type checking errors --- api/verify.php | 1 + s.php | 1 + 2 files changed, 2 insertions(+) diff --git a/api/verify.php b/api/verify.php index a677084..82c1eee 100644 --- a/api/verify.php +++ b/api/verify.php @@ -38,6 +38,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if ($proofExpiry > 0 && time() > $proofExpiry) { unset($proofs[$code]); [$fp, $allProofs] = read_json_locked($dbFile); + /** @var array $allProofs */ if (isset($allProofs[$code])) { unset($allProofs[$code]); write_json_locked($fp, $allProofs); diff --git a/s.php b/s.php index 025ccbf..bc2a3ca 100644 --- a/s.php +++ b/s.php @@ -38,6 +38,7 @@ if ($expiryTs > 0 && time() > $expiryTs) { require_once __DIR__ . '/api/_helpers.php'; // Delete expired URL [$fp, $urls] = read_json_locked(__DIR__ . '/data/urls.json'); + /** @var array $urls */ if (isset($urls[$code])) { unset($urls[$code]); write_json_locked($fp, $urls);