Skip to content

Commit

Permalink
Merge pull request #5933 from phansys/ibm_db2_sca
Browse files Browse the repository at this point in the history
[SCA] Update requirement for "phpstan/phpstan"
  • Loading branch information
derrabus authored Feb 23, 2023
2 parents 4173dfc + dffaff0 commit 2c8afad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"doctrine/coding-standard": "11.1.0",
"fig/log-test": "^1",
"jetbrains/phpstorm-stubs": "2022.3",
"phpstan/phpstan": "1.10.0",
"phpstan/phpstan": "1.10.2",
"phpstan/phpstan-strict-rules": "^1.5",
"phpunit/phpunit": "9.6.3",
"psalm/plugin-phpunit": "0.18.4",
Expand Down
16 changes: 3 additions & 13 deletions src/Driver/IBMDB2/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
use function db2_rollback;
use function db2_server_info;
use function error_get_last;
use function is_bool;

use const DB2_AUTOCOMMIT_OFF;
use const DB2_AUTOCOMMIT_ON;
Expand Down Expand Up @@ -113,10 +112,7 @@ public function lastInsertId($name = null)

public function beginTransaction(): bool
{
$result = db2_autocommit($this->connection, DB2_AUTOCOMMIT_OFF);
assert(is_bool($result));

return $result;
return db2_autocommit($this->connection, DB2_AUTOCOMMIT_OFF);
}

public function commit(): bool
Expand All @@ -125,10 +121,7 @@ public function commit(): bool
throw ConnectionError::new($this->connection);
}

$result = db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON);
assert(is_bool($result));

return $result;
return db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON);
}

public function rollBack(): bool
Expand All @@ -137,10 +130,7 @@ public function rollBack(): bool
throw ConnectionError::new($this->connection);
}

$result = db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON);
assert(is_bool($result));

return $result;
return db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON);
}

/** @return resource */
Expand Down

0 comments on commit 2c8afad

Please sign in to comment.