Skip to content

Commit

Permalink
Reuse try block
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Oct 12, 2024
1 parent 88879b3 commit 086213b
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1279,19 +1279,9 @@ public function transactional(Closure $func)
{
$this->beginTransaction();

$successful = false;

try {
$res = $func($this);

$successful = true;
} finally {
if (! $successful) {
$this->rollBack();
}
}

try {
$this->commit();
} finally {
if ($this->isTransactionActive()) {
Expand Down

0 comments on commit 086213b

Please sign in to comment.