Skip to content

Commit

Permalink
fix: removed errorCode and errorInfo from PDOStatement
Browse files Browse the repository at this point in the history
  • Loading branch information
tbreuss committed Feb 9, 2024
1 parent 3ce6f7a commit 14f1cd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/PDOResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __call(string $name, array $arguments): mixed
*/
public function bindColumn(string|int $column, mixed &$var, int $type = PDO::PARAM_STR, int $maxLength = 0, mixed $driverOptions = null): bool
{
// method was implemented because of the passed by reference $var param
// method is implemented because of the passed by reference $var param
return $this->stmt->bindColumn($column, $var, $type, $maxLength, $driverOptions);
}

Expand Down
10 changes: 3 additions & 7 deletions src/PDOStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

/**
* @method bool bindValue(string|int $param, mixed $value, int $type = PDO::PARAM_STR) Binds a value to a parameter
* @method ?string errorCode() Fetch the SQLSTATE associated with the last operation on the statement handle
* @method array errorInfo() Fetch extended error information associated with the last operation on the statement handle
* @method mixed getAttribute(int $name) Retrieve a statement attribute
* @method bool setAttribute(int $attribute, mixed $value) Set a statement attribute
*/
Expand Down Expand Up @@ -33,10 +31,8 @@ public function __construct(\PDOStatement $stmt)
public function __call(string $name, array $arguments): mixed
{
$methods = [
'bindValue',
'errorCode',
'errorInfo',
'getAttribute',
'bindValue',
'getAttribute',
'setAttribute'
];

Expand All @@ -52,7 +48,7 @@ public function __call(string $name, array $arguments): mixed
*/
public function bindParam(string|int $param, mixed &$var, int $type = PDO::PARAM_STR, int $maxLength = 0, mixed $driverOptions = null): bool
{
// method was implemented because of the passed by reference $var param
// method is implemented because of the passed by reference $var param
return $this->stmt->bindParam($param, $var, $type, $maxLength, $driverOptions);
}

Expand Down

0 comments on commit 14f1cd7

Please sign in to comment.