diff --git a/src/Connection.php b/src/Connection.php index 870fc755930..32839d3bbd3 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -401,6 +401,8 @@ private function getDatabasePlatformVersion() * Returns the database server version if the underlying driver supports it. * * @return string|null + * + * @throws DBALException */ private function getServerVersion() { @@ -626,6 +628,8 @@ public function close() * @param int $level The level to set. * * @return int + * + * @throws DBALException */ public function setTransactionIsolation($level) { @@ -638,6 +642,8 @@ public function setTransactionIsolation($level) * Gets the currently active transaction isolation level. * * @return int The current transaction isolation level. + * + * @throws DBALException */ public function getTransactionIsolation() { @@ -1226,6 +1232,8 @@ protected function _getNestedTransactionSavePointName() /** * @return bool + * + * @throws DBALException */ public function beginTransaction() { @@ -1314,6 +1322,8 @@ public function commit() /** * Commits all current nesting transactions. + * + * @throws DBALException */ private function commitAll(): void { @@ -1442,6 +1452,8 @@ public function rollbackSavepoint($savepoint) * Gets the wrapped driver connection. * * @return DriverConnection + * + * @throws DBALException */ public function getWrappedConnection() { @@ -1513,6 +1525,8 @@ public function isRollbackOnly() * @param string $type The name of the DBAL mapping type. * * @return mixed The converted value. + * + * @throws DBALException */ public function convertToDatabaseValue($value, $type) { @@ -1527,6 +1541,8 @@ public function convertToDatabaseValue($value, $type) * @param string $type The name of the DBAL mapping type. * * @return mixed The converted type. + * + * @throws DBALException */ public function convertToPHPValue($value, $type) { @@ -1540,6 +1556,8 @@ public function convertToPHPValue($value, $type) * @param DriverStatement $stmt The statement to bind the values to. * @param mixed[] $params The map/list of named/positional parameters. * @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 { @@ -1581,6 +1599,8 @@ private function _bindTypedValues(DriverStatement $stmt, array $params, array $t * @param int|string|null $type The type to bind (PDO or DBAL). * * @return mixed[] [0] => the (escaped) value, [1] => the binding type. + * + * @throws DBALException */ private function getBindingInfo($value, $type) { diff --git a/src/Connections/PrimaryReadReplicaConnection.php b/src/Connections/PrimaryReadReplicaConnection.php index 2bf961900bd..00ab615d472 100644 --- a/src/Connections/PrimaryReadReplicaConnection.php +++ b/src/Connections/PrimaryReadReplicaConnection.php @@ -98,6 +98,7 @@ class PrimaryReadReplicaConnection extends Connection * * @param mixed[] $params * + * @throws DBALException * @throws InvalidArgumentException */ public function __construct(array $params, Driver $driver, ?Configuration $config = null, ?EventManager $eventManager = null) diff --git a/src/Driver/PDO/Connection.php b/src/Driver/PDO/Connection.php index 7dc1821ed4e..f3c292c9b83 100644 --- a/src/Driver/PDO/Connection.php +++ b/src/Driver/PDO/Connection.php @@ -60,6 +60,8 @@ public function getServerVersion() } /** + * {@inheritDoc} + * * @return Statement */ public function prepare(string $sql): StatementInterface diff --git a/src/Event/Listeners/OracleSessionInit.php b/src/Event/Listeners/OracleSessionInit.php index 67fc78c3b6e..065c1162198 100644 --- a/src/Event/Listeners/OracleSessionInit.php +++ b/src/Event/Listeners/OracleSessionInit.php @@ -3,6 +3,7 @@ namespace Doctrine\DBAL\Event\Listeners; use Doctrine\Common\EventSubscriber; +use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Event\ConnectionEventArgs; use Doctrine\DBAL\Events; @@ -44,6 +45,8 @@ public function __construct(array $oracleSessionVars = []) /** * @return void + * + * @throws DBALException */ public function postConnect(ConnectionEventArgs $args) { diff --git a/src/Platforms/AbstractPlatform.php b/src/Platforms/AbstractPlatform.php index 65dbda3df83..332f10e77be 100644 --- a/src/Platforms/AbstractPlatform.php +++ b/src/Platforms/AbstractPlatform.php @@ -2165,6 +2165,8 @@ public function getColumnDeclarationListSQL(array $fields) * a string that defines the complete column * * @return string DBMS specific SQL code portion that should be used to declare the column. + * + * @throws DBALException */ public function getColumnDeclarationSQL($name, array $field) { diff --git a/src/Platforms/MySqlPlatform.php b/src/Platforms/MySqlPlatform.php index 3b305d91051..ac60b906082 100644 --- a/src/Platforms/MySqlPlatform.php +++ b/src/Platforms/MySqlPlatform.php @@ -2,6 +2,7 @@ namespace Doctrine\DBAL\Platforms; +use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Schema\ForeignKeyConstraint; use Doctrine\DBAL\Schema\Identifier; use Doctrine\DBAL\Schema\Index; @@ -694,6 +695,8 @@ protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff) /** * @return string[] + * + * @throws DBALException */ private function getPreAlterTableAlterPrimaryKeySQL(TableDiff $diff, Index $index) { @@ -733,6 +736,8 @@ private function getPreAlterTableAlterPrimaryKeySQL(TableDiff $diff, Index $inde * @param TableDiff $diff The table diff to gather the SQL for. * * @return string[] + * + * @throws DBALException */ private function getPreAlterTableAlterIndexForeignKeySQL(TableDiff $diff) { diff --git a/src/Platforms/SqlitePlatform.php b/src/Platforms/SqlitePlatform.php index 14e90545451..3ab4c6c7d22 100644 --- a/src/Platforms/SqlitePlatform.php +++ b/src/Platforms/SqlitePlatform.php @@ -963,6 +963,8 @@ public function getAlterTableSQL(TableDiff $diff) /** * @return string[]|false + * + * @throws DBALException */ private function getSimpleAlterTableSQL(TableDiff $diff) { diff --git a/src/Query/QueryBuilder.php b/src/Query/QueryBuilder.php index 7b712dbb751..5171f7b9682 100644 --- a/src/Query/QueryBuilder.php +++ b/src/Query/QueryBuilder.php @@ -3,6 +3,7 @@ namespace Doctrine\DBAL\Query; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Driver\Result; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\Expression\CompositeExpression; @@ -202,6 +203,8 @@ public function getState() * for insert, update and delete statements. * * @return Result|int + * + * @throws DBALException */ public function execute() {