Skip to content
Snippets Groups Projects
Commit eceff033 authored by Mateusz Charytoniuk's avatar Mateusz Charytoniuk
Browse files

chore: convert manually thrown exception to reused assertion check

parent a601067f
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "df9e472d91fa26ebe6b86782d4147960", "content-hash": "6cc5c7a01d9bb04a890e15a3e326d795",
"packages": [ "packages": [
{ {
"name": "brick/math", "name": "brick/math",
......
...@@ -8,7 +8,6 @@ use Doctrine\DBAL\Driver\Connection; ...@@ -8,7 +8,6 @@ use Doctrine\DBAL\Driver\Connection;
use PDO; use PDO;
use PDOStatement; use PDOStatement;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use RuntimeException;
use Swoole\Database\PDOProxy; use Swoole\Database\PDOProxy;
use Swoole\Database\PDOStatementProxy; use Swoole\Database\PDOStatementProxy;
use Swoole\Event; use Swoole\Event;
...@@ -147,11 +146,7 @@ readonly class DatabaseConnection implements Connection ...@@ -147,11 +146,7 @@ readonly class DatabaseConnection implements Connection
*/ */
$quoted = $this->pdo->quote($value); $quoted = $this->pdo->quote($value);
if (!is_string($quoted)) { return $this->assertNotFalse($quoted);
throw new RuntimeException('Unable to quote string: '.$value);
}
return $quoted;
} }
public function rollBack(): void public function rollBack(): void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment