Add missing @throws DBALException

parent 2494d9bc
...@@ -401,6 +401,8 @@ class Connection ...@@ -401,6 +401,8 @@ class Connection
* Returns the database server version if the underlying driver supports it. * Returns the database server version if the underlying driver supports it.
* *
* @return string|null * @return string|null
*
* @throws DBALException
*/ */
private function getServerVersion() private function getServerVersion()
{ {
...@@ -626,6 +628,8 @@ class Connection ...@@ -626,6 +628,8 @@ class Connection
* @param int $level The level to set. * @param int $level The level to set.
* *
* @return int * @return int
*
* @throws DBALException
*/ */
public function setTransactionIsolation($level) public function setTransactionIsolation($level)
{ {
...@@ -638,6 +642,8 @@ class Connection ...@@ -638,6 +642,8 @@ class Connection
* Gets the currently active transaction isolation level. * Gets the currently active transaction isolation level.
* *
* @return int The current transaction isolation level. * @return int The current transaction isolation level.
*
* @throws DBALException
*/ */
public function getTransactionIsolation() public function getTransactionIsolation()
{ {
...@@ -1226,6 +1232,8 @@ class Connection ...@@ -1226,6 +1232,8 @@ class Connection
/** /**
* @return bool * @return bool
*
* @throws DBALException
*/ */
public function beginTransaction() public function beginTransaction()
{ {
...@@ -1314,6 +1322,8 @@ class Connection ...@@ -1314,6 +1322,8 @@ class Connection
/** /**
* Commits all current nesting transactions. * Commits all current nesting transactions.
*
* @throws DBALException
*/ */
private function commitAll(): void private function commitAll(): void
{ {
...@@ -1442,6 +1452,8 @@ class Connection ...@@ -1442,6 +1452,8 @@ class Connection
* Gets the wrapped driver connection. * Gets the wrapped driver connection.
* *
* @return DriverConnection * @return DriverConnection
*
* @throws DBALException
*/ */
public function getWrappedConnection() public function getWrappedConnection()
{ {
...@@ -1513,6 +1525,8 @@ class Connection ...@@ -1513,6 +1525,8 @@ class Connection
* @param string $type The name of the DBAL mapping type. * @param string $type The name of the DBAL mapping type.
* *
* @return mixed The converted value. * @return mixed The converted value.
*
* @throws DBALException
*/ */
public function convertToDatabaseValue($value, $type) public function convertToDatabaseValue($value, $type)
{ {
...@@ -1527,6 +1541,8 @@ class Connection ...@@ -1527,6 +1541,8 @@ class Connection
* @param string $type The name of the DBAL mapping type. * @param string $type The name of the DBAL mapping type.
* *
* @return mixed The converted type. * @return mixed The converted type.
*
* @throws DBALException
*/ */
public function convertToPHPValue($value, $type) public function convertToPHPValue($value, $type)
{ {
...@@ -1540,6 +1556,8 @@ class Connection ...@@ -1540,6 +1556,8 @@ class Connection
* @param DriverStatement $stmt The statement to bind the values to. * @param DriverStatement $stmt The statement to bind the values to.
* @param mixed[] $params The map/list of named/positional parameters. * @param mixed[] $params The map/list of named/positional parameters.
* @param int[]|string[] $types The parameter types (PDO binding types or DBAL mapping types). * @param int[]|string[] $types The parameter types (PDO binding types or DBAL mapping types).
*
* @throws DBALException
*/ */
private function _bindTypedValues(DriverStatement $stmt, array $params, array $types): void private function _bindTypedValues(DriverStatement $stmt, array $params, array $types): void
{ {
...@@ -1581,6 +1599,8 @@ class Connection ...@@ -1581,6 +1599,8 @@ class Connection
* @param int|string|null $type The type to bind (PDO or DBAL). * @param int|string|null $type The type to bind (PDO or DBAL).
* *
* @return mixed[] [0] => the (escaped) value, [1] => the binding type. * @return mixed[] [0] => the (escaped) value, [1] => the binding type.
*
* @throws DBALException
*/ */
private function getBindingInfo($value, $type) private function getBindingInfo($value, $type)
{ {
......
...@@ -98,6 +98,7 @@ class PrimaryReadReplicaConnection extends Connection ...@@ -98,6 +98,7 @@ class PrimaryReadReplicaConnection extends Connection
* *
* @param mixed[] $params * @param mixed[] $params
* *
* @throws DBALException
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
public function __construct(array $params, Driver $driver, ?Configuration $config = null, ?EventManager $eventManager = null) public function __construct(array $params, Driver $driver, ?Configuration $config = null, ?EventManager $eventManager = null)
......
...@@ -60,6 +60,8 @@ final class Connection implements ServerInfoAwareConnection ...@@ -60,6 +60,8 @@ final class Connection implements ServerInfoAwareConnection
} }
/** /**
* {@inheritDoc}
*
* @return Statement * @return Statement
*/ */
public function prepare(string $sql): StatementInterface public function prepare(string $sql): StatementInterface
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace Doctrine\DBAL\Event\Listeners; namespace Doctrine\DBAL\Event\Listeners;
use Doctrine\Common\EventSubscriber; use Doctrine\Common\EventSubscriber;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Event\ConnectionEventArgs; use Doctrine\DBAL\Event\ConnectionEventArgs;
use Doctrine\DBAL\Events; use Doctrine\DBAL\Events;
...@@ -44,6 +45,8 @@ class OracleSessionInit implements EventSubscriber ...@@ -44,6 +45,8 @@ class OracleSessionInit implements EventSubscriber
/** /**
* @return void * @return void
*
* @throws DBALException
*/ */
public function postConnect(ConnectionEventArgs $args) public function postConnect(ConnectionEventArgs $args)
{ {
......
...@@ -2165,6 +2165,8 @@ abstract class AbstractPlatform ...@@ -2165,6 +2165,8 @@ abstract class AbstractPlatform
* a string that defines the complete column * a string that defines the complete column
* *
* @return string DBMS specific SQL code portion that should be used to declare the column. * @return string DBMS specific SQL code portion that should be used to declare the column.
*
* @throws DBALException
*/ */
public function getColumnDeclarationSQL($name, array $field) public function getColumnDeclarationSQL($name, array $field)
{ {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace Doctrine\DBAL\Platforms; namespace Doctrine\DBAL\Platforms;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Schema\ForeignKeyConstraint; use Doctrine\DBAL\Schema\ForeignKeyConstraint;
use Doctrine\DBAL\Schema\Identifier; use Doctrine\DBAL\Schema\Identifier;
use Doctrine\DBAL\Schema\Index; use Doctrine\DBAL\Schema\Index;
...@@ -694,6 +695,8 @@ SQL ...@@ -694,6 +695,8 @@ SQL
/** /**
* @return string[] * @return string[]
*
* @throws DBALException
*/ */
private function getPreAlterTableAlterPrimaryKeySQL(TableDiff $diff, Index $index) private function getPreAlterTableAlterPrimaryKeySQL(TableDiff $diff, Index $index)
{ {
...@@ -733,6 +736,8 @@ SQL ...@@ -733,6 +736,8 @@ SQL
* @param TableDiff $diff The table diff to gather the SQL for. * @param TableDiff $diff The table diff to gather the SQL for.
* *
* @return string[] * @return string[]
*
* @throws DBALException
*/ */
private function getPreAlterTableAlterIndexForeignKeySQL(TableDiff $diff) private function getPreAlterTableAlterIndexForeignKeySQL(TableDiff $diff)
{ {
......
...@@ -963,6 +963,8 @@ class SqlitePlatform extends AbstractPlatform ...@@ -963,6 +963,8 @@ class SqlitePlatform extends AbstractPlatform
/** /**
* @return string[]|false * @return string[]|false
*
* @throws DBALException
*/ */
private function getSimpleAlterTableSQL(TableDiff $diff) private function getSimpleAlterTableSQL(TableDiff $diff)
{ {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace Doctrine\DBAL\Query; namespace Doctrine\DBAL\Query;
use Doctrine\DBAL\Connection; use Doctrine\DBAL\Connection;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver\Result; use Doctrine\DBAL\Driver\Result;
use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Query\Expression\CompositeExpression; use Doctrine\DBAL\Query\Expression\CompositeExpression;
...@@ -202,6 +203,8 @@ class QueryBuilder ...@@ -202,6 +203,8 @@ class QueryBuilder
* for insert, update and delete statements. * for insert, update and delete statements.
* *
* @return Result|int * @return Result|int
*
* @throws DBALException
*/ */
public function execute() public function execute()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment