Add missing exception annotation to schema managers

parent 93e61511
This diff is collapsed.
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Platforms\DB2Platform; use Doctrine\DBAL\Platforms\DB2Platform;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
...@@ -37,6 +38,8 @@ class DB2SchemaManager extends AbstractSchemaManager ...@@ -37,6 +38,8 @@ class DB2SchemaManager extends AbstractSchemaManager
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @throws DBALException
*/ */
protected function _getPortableTableColumnDefinition($tableColumn) protected function _getPortableTableColumnDefinition($tableColumn)
{ {
......
...@@ -297,6 +297,8 @@ class OracleSchemaManager extends AbstractSchemaManager ...@@ -297,6 +297,8 @@ class OracleSchemaManager extends AbstractSchemaManager
* @param string $table * @param string $table
* *
* @return bool * @return bool
*
* @throws DBALException
*/ */
public function dropAutoincrement($table) public function dropAutoincrement($table)
{ {
...@@ -347,6 +349,8 @@ class OracleSchemaManager extends AbstractSchemaManager ...@@ -347,6 +349,8 @@ class OracleSchemaManager extends AbstractSchemaManager
* @param string $user The name of the user to kill sessions for. * @param string $user The name of the user to kill sessions for.
* *
* @return void * @return void
*
* @throws DBALException
*/ */
private function killUserSessions($user) private function killUserSessions($user)
{ {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Exception\DriverException; use Doctrine\DBAL\Exception\DriverException;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
...@@ -39,6 +40,8 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager ...@@ -39,6 +40,8 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
* Gets all the existing schema names. * Gets all the existing schema names.
* *
* @return string[] * @return string[]
*
* @throws DBALException
*/ */
public function getSchemaNames() public function getSchemaNames()
{ {
...@@ -46,11 +49,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager ...@@ -46,11 +49,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
} }
/** /**
* Returns an array of schema search paths. * {@inheritDoc}
*
* This is a PostgreSQL only function.
*
* @return string[]
*/ */
public function getSchemaSearchPaths() public function getSchemaSearchPaths()
{ {
......
...@@ -319,6 +319,8 @@ class SQLServerSchemaManager extends AbstractSchemaManager ...@@ -319,6 +319,8 @@ class SQLServerSchemaManager extends AbstractSchemaManager
* @param string $database The name of the database to close currently active connections for. * @param string $database The name of the database to close currently active connections for.
* *
* @return void * @return void
*
* @throws DBALException
*/ */
private function closeActiveDatabaseConnections($database) private function closeActiveDatabaseConnections($database)
{ {
...@@ -334,6 +336,8 @@ class SQLServerSchemaManager extends AbstractSchemaManager ...@@ -334,6 +336,8 @@ class SQLServerSchemaManager extends AbstractSchemaManager
/** /**
* @param string $tableName * @param string $tableName
*
* @throws DBALException
*/ */
public function listTableDetails($tableName): Table public function listTableDetails($tableName): Table
{ {
......
...@@ -501,6 +501,9 @@ CREATE\sTABLE # Match "CREATE TABLE" ...@@ -501,6 +501,9 @@ CREATE\sTABLE # Match "CREATE TABLE"
return $comment === '' ? null : $comment; return $comment === '' ? null : $comment;
} }
/**
* @throws DBALException
*/
private function getCreateTableSQL(string $table): string private function getCreateTableSQL(string $table): string
{ {
$sql = $this->_conn->fetchOne( $sql = $this->_conn->fetchOne(
...@@ -528,6 +531,8 @@ SQL ...@@ -528,6 +531,8 @@ SQL
} }
/** /**
* {@inheritDoc}
*
* @param string $tableName * @param string $tableName
*/ */
public function listTableDetails($tableName): Table public function listTableDetails($tableName): Table
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace Doctrine\DBAL\Schema\Synchronizer; namespace Doctrine\DBAL\Schema\Synchronizer;
use Doctrine\DBAL\Connection; use Doctrine\DBAL\Connection;
use Doctrine\DBAL\DBALException;
use Throwable; use Throwable;
/** /**
...@@ -37,6 +38,8 @@ abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer ...@@ -37,6 +38,8 @@ abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer
* @param string[] $sql * @param string[] $sql
* *
* @return void * @return void
*
* @throws DBALException
*/ */
protected function processSql(array $sql) protected function processSql(array $sql)
{ {
......
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