pdo = $GLOBALS['pdo']; return; } throw new \RuntimeException('Global PDO connection not initialized'); } public function getIdByStatus(string $status): ?int { $stmt = $this->pdo->prepare('SELECT status_id FROM "status" WHERE LOWER(status_status) = LOWER(:status) LIMIT 1'); $stmt->execute(['status' => $status]); $id = $stmt->fetchColumn(); return $id === false ? null : (int)$id; } }