Skip to content

Commit

Permalink
fix PHPStan on older PHPs
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Jan 23, 2022
1 parent a2705c9 commit 79c637e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Drivers/Mysqli/MysqliDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function getAffectedRows(): int
{
assert($this->connection !== null);
$affectedRows = $this->connection->affected_rows;
if (is_string($affectedRows)) {
if (is_string($affectedRows)) { // @phpstan-ignore-line
// Integer overflow, read the real value via IConnection::getDriver()::getResourceHandle()->affected_rows
return -2;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Mysqli/MysqliResultAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function getTypes(): array
public function getRowsCount(): int
{
$rows = $this->result->num_rows;
if (is_string($rows)) {
if (is_string($rows)) { // @phpstan-ignore-line
throw new InvalidStateException("Query returned more rows that Integer can store.");
}
return $rows;
Expand Down

0 comments on commit 79c637e

Please sign in to comment.