Skip to content

Commit

Permalink
cleanup abstract extended pdo to fulfill the interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Werner Spiegel committed Jan 12, 2022
1 parent 0f7bff6 commit 7a27b3e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/AbstractExtendedPdo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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__);
Expand Down

0 comments on commit 7a27b3e

Please sign in to comment.