Skip to content

Commit

Permalink
Merge pull request #219 from nextras/dependabot/composer/phpstan/phps…
Browse files Browse the repository at this point in the history
…tan-1.10.36

build(deps-dev): update phpstan/phpstan requirement from 1.10.32 to 1.10.36
  • Loading branch information
hrach authored Oct 15, 2023
2 parents 05ae6de + c885095 commit 19c7865
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"nette/neon": "~3.0",
"nextras/multi-query-parser": "1.0.0",
"phpstan/extension-installer": "1.3.1",
"phpstan/phpstan": "1.10.32",
"phpstan/phpstan": "1.10.38",
"phpstan/phpstan-deprecation-rules": "1.1.4",
"phpstan/phpstan-strict-rules": "1.5.1",
"symfony/config": "~4.4 || ~5.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/NetteDI/DbalExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected function setupConnection(array $config): void
if (isset($config['debugger'])) {
$debugger = (bool) $config['debugger'];
} else {
$debugger = class_exists(\Tracy\Debugger::class, false) && Debugger::$productionMode === Debugger::DEVELOPMENT;
$debugger = class_exists(\Tracy\Debugger::class, false) && Debugger::$productionMode === false; // false === Debugger::Development
}

if ($debugger) {
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Mysqli/MysqliDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function getAffectedRows(): int
$this->checkConnection();
assert($this->connection !== null);
$affectedRows = $this->connection->affected_rows;
if (is_string($affectedRows)) { // @phpstan-ignore-line
if (is_string($affectedRows)) {
// Integer overflow, read the real value via IConnection::getDriver()::getResourceHandle()->affected_rows
return -2;
}
Expand Down
3 changes: 1 addition & 2 deletions src/Drivers/Mysqli/MysqliResultAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ public function getTypes(): array

public function getRowsCount(): int
{
/** @phpstan-var int<0, max>|string $rows */
$rows = $this->result->num_rows;
if (is_string($rows)) { // @phpstan-ignore-line
if (is_string($rows)) {
throw new InvalidStateException("Query returned more rows that Integer can store.");
}
return $rows;
Expand Down

0 comments on commit 19c7865

Please sign in to comment.