Skip to content

Commit 086213b

Browse files
committed
Reuse try block
1 parent 88879b3 commit 086213b

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/Connection.php

-10
Original file line numberDiff line numberDiff line change
@@ -1279,19 +1279,9 @@ public function transactional(Closure $func)
12791279
{
12801280
$this->beginTransaction();
12811281

1282-
$successful = false;
1283-
12841282
try {
12851283
$res = $func($this);
12861284

1287-
$successful = true;
1288-
} finally {
1289-
if (! $successful) {
1290-
$this->rollBack();
1291-
}
1292-
}
1293-
1294-
try {
12951285
$this->commit();
12961286
} finally {
12971287
if ($this->isTransactionActive()) {

0 commit comments

Comments
 (0)