Add missing exception annotation to the schema classes

parent 15bec73c
......@@ -58,6 +58,8 @@ class Column extends AbstractAsset
*
* @param string $columnName
* @param mixed[] $options
*
* @throws SchemaException
*/
public function __construct($columnName, Type $type, array $options = [])
{
......@@ -70,6 +72,8 @@ class Column extends AbstractAsset
* @param mixed[] $options
*
* @return Column
*
* @throws SchemaException
*/
public function setOptions(array $options)
{
......
......@@ -22,6 +22,8 @@ class Comparator
{
/**
* @return SchemaDiff
*
* @throws SchemaException
*/
public static function compareSchemas(Schema $fromSchema, Schema $toSchema)
{
......@@ -38,6 +40,8 @@ class Comparator
* stored in $toSchema.
*
* @return SchemaDiff
*
* @throws SchemaException
*/
public function compare(Schema $fromSchema, Schema $toSchema)
{
......@@ -188,6 +192,8 @@ class Comparator
* If there are no differences this method returns the boolean false.
*
* @return TableDiff|false
*
* @throws SchemaException
*/
public function diffTable(Table $table1, Table $table2)
{
......
......@@ -58,6 +58,8 @@ class Schema extends AbstractAsset
* @param Table[] $tables
* @param Sequence[] $sequences
* @param string[] $namespaces
*
* @throws SchemaException
*/
public function __construct(
array $tables = [],
......@@ -316,6 +318,8 @@ class Schema extends AbstractAsset
* @param string $tableName
*
* @return Table
*
* @throws SchemaException
*/
public function createTable($tableName)
{
......@@ -336,6 +340,8 @@ class Schema extends AbstractAsset
* @param string $newTableName
*
* @return Schema
*
* @throws SchemaException
*/
public function renameTable($oldTableName, $newTableName)
{
......@@ -354,6 +360,8 @@ class Schema extends AbstractAsset
* @param string $tableName
*
* @return Schema
*
* @throws SchemaException
*/
public function dropTable($tableName)
{
......@@ -372,6 +380,8 @@ class Schema extends AbstractAsset
* @param int $initialValue
*
* @return Sequence
*
* @throws SchemaException
*/
public function createSequence($sequenceName, $allocationSize = 1, $initialValue = 1)
{
......@@ -422,6 +432,8 @@ class Schema extends AbstractAsset
/**
* @return string[]
*
* @throws SchemaException
*/
public function getMigrateToSql(Schema $toSchema, AbstractPlatform $platform)
{
......@@ -433,6 +445,8 @@ class Schema extends AbstractAsset
/**
* @return string[]
*
* @throws SchemaException
*/
public function getMigrateFromSql(Schema $fromSchema, AbstractPlatform $platform)
{
......
......@@ -104,6 +104,8 @@ class Table extends AbstractAsset
* @param string|false $indexName
*
* @return self
*
* @throws SchemaException
*/
public function setPrimaryKey(array $columnNames, $indexName = false)
{
......@@ -128,6 +130,8 @@ class Table extends AbstractAsset
* @param mixed[] $options
*
* @return self
*
* @throws SchemaException
*/
public function addIndex(array $columnNames, $indexName = null, array $flags = [], array $options = [])
{
......@@ -146,6 +150,8 @@ class Table extends AbstractAsset
* Drops the primary key from this table.
*
* @return void
*
* @throws SchemaException
*/
public function dropPrimaryKey()
{
......@@ -182,6 +188,8 @@ class Table extends AbstractAsset
* @param mixed[] $options
*
* @return self
*
* @throws SchemaException
*/
public function addUniqueIndex(array $columnNames, $indexName = null, array $options = [])
{
......@@ -293,6 +301,8 @@ class Table extends AbstractAsset
* @param mixed[] $options
*
* @return Column
*
* @throws SchemaException
*/
public function addColumn($columnName, $typeName, array $options = [])
{
......@@ -310,6 +320,8 @@ class Table extends AbstractAsset
* @param mixed[] $options
*
* @return self
*
* @throws SchemaException
*/
public function changeColumn($columnName, array $options)
{
......@@ -346,6 +358,8 @@ class Table extends AbstractAsset
* @param string|null $name
*
* @return self
*
* @throws SchemaException
*/
public function addForeignKeyConstraint($foreignTable, array $localColumnNames, array $foreignColumnNames, array $options = [], $name = null)
{
......@@ -452,6 +466,8 @@ class Table extends AbstractAsset
/**
* @return void
*
* @throws SchemaException
*/
protected function _addForeignKeyConstraint(ForeignKeyConstraint $constraint)
{
......@@ -745,6 +761,8 @@ class Table extends AbstractAsset
/**
* @return void
*
* @throws SchemaException
*/
public function visit(Visitor $visitor)
{
......
......@@ -6,6 +6,7 @@ use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
use Doctrine\DBAL\Schema\Index;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\SchemaException;
use Doctrine\DBAL\Schema\Sequence;
use Doctrine\DBAL\Schema\Table;
......@@ -16,6 +17,8 @@ interface Visitor
{
/**
* @return void
*
* @throws SchemaException
*/
public function acceptSchema(Schema $schema);
......@@ -31,6 +34,8 @@ interface Visitor
/**
* @return void
*
* @throws SchemaException
*/
public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint);
......
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