From 7a27b3efa5eed2076c35c7119d59d59d5e7064ab Mon Sep 17 00:00:00 2001 From: Werner Spiegel Date: Wed, 12 Jan 2022 12:12:35 +0100 Subject: [PATCH] cleanup abstract extended pdo to fulfill the interface --- src/AbstractExtendedPdo.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/AbstractExtendedPdo.php b/src/AbstractExtendedPdo.php index 8816232..cb28bbc 100644 --- a/src/AbstractExtendedPdo.php +++ b/src/AbstractExtendedPdo.php @@ -200,12 +200,12 @@ public function errorInfo(): array * * @param string $statement The SQL statement to prepare and execute. * - * @return int The number of affected rows. + * @return int|false The number of affected rows. * * @see http://php.net/manual/en/pdo.exec.php * */ - public function exec(string $statement): int + public function exec(string $statement): int|false { $this->connect(); $this->profiler->start(__FUNCTION__); @@ -567,12 +567,12 @@ public function perform(string $statement, array $values = []): PDOStatement * @param array $options Set these attributes on the returned * PDOStatement. * - * @return PDOStatement + * @return PDOStatement|false * * @see http://php.net/manual/en/pdo.prepare.php * */ - public function prepare(string $query, array $options = []): PDOStatement + public function prepare(string $query, array $options = []): PDOStatement|false { $this->connect(); $sth = $this->pdo->prepare($query, $options); @@ -638,12 +638,12 @@ public function prepareWithValues(string $statement, array $values = []): PDOSta * * @param mixed ...$fetch_mode_args Optional fetch-related parameters. * - * @return PDOStatement + * @return PDOStatement|false * * @see http://php.net/manual/en/pdo.query.php * */ - public function query(string $query, ?int $fetchMode = null, mixed ...$fetch_mode_args): PDOStatement + public function query(string $query, ?int $fetchMode = null, mixed ...$fetch_mode_args): PDOStatement|false { $this->connect(); $this->profiler->start(__FUNCTION__);