Skip to content

Commit

Permalink
Remove unnecessary condition
Browse files Browse the repository at this point in the history
Signed-off-by: pine3ree <[email protected]>
  • Loading branch information
pine3ree committed Oct 4, 2023
1 parent 53b9e13 commit debb6c0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/PDO/Reconnecting/PDO.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,10 @@ protected function pdo(): \PDO

$this->pdo = parent::pdo();

if (isset($this->pdo)) {
$this->lastConnectedAt = microtime(true);
$this->connectionCount += 1;

return $this->pdo;
}
$this->lastConnectedAt = microtime(true);
$this->connectionCount += 1;

throw new RuntimeException("Unable to create a PDO instance!");
return $this->pdo;
}

/**
Expand Down

0 comments on commit debb6c0

Please sign in to comment.