From 17dcf3f6ed112bb85a37cf13538fd8de49f5c274 Mon Sep 17 00:00:00 2001 From: Joyce Babu Date: Sat, 4 Feb 2023 20:57:00 +0530 Subject: [PATCH] fix: preparedId is nullable (#516) --- src/DebugBar/DataCollector/PDO/TracedStatement.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/DebugBar/DataCollector/PDO/TracedStatement.php b/src/DebugBar/DataCollector/PDO/TracedStatement.php index 0385d1be..9111489b 100644 --- a/src/DebugBar/DataCollector/PDO/TracedStatement.php +++ b/src/DebugBar/DataCollector/PDO/TracedStatement.php @@ -27,12 +27,14 @@ class TracedStatement protected $exception; + protected $preparedId; + /** * @param string $sql * @param array $params - * @param string $preparedId + * @param null|string $preparedId */ - public function __construct(string $sql, array $params = [], $preparedId = null) + public function __construct(string $sql, array $params = [], ?string $preparedId = null) { $this->sql = $sql; $this->parameters = $this->checkParameters($params); @@ -164,9 +166,9 @@ public function getParameters() : array /** * Returns the prepared statement id * - * @return string + * @return null|string */ - public function getPreparedId() : string + public function getPreparedId() : ?string { return $this->preparedId; }