Commit b80a56d5 authored by Jan Sorgalla's avatar Jan Sorgalla

Fix type checking

parent 106f152d
...@@ -54,12 +54,11 @@ class SchemaDropTableEventArgs extends SchemaEventArgs ...@@ -54,12 +54,11 @@ class SchemaDropTableEventArgs extends SchemaEventArgs
*/ */
public function __construct($table, AbstractPlatform $platform) public function __construct($table, AbstractPlatform $platform)
{ {
if ($table instanceof Table || is_string($table)) { if (!$table instanceof Table && !is_string($table)) {
$this->_table = $table;
} else {
throw new \InvalidArgumentException('SchemaCreateTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); throw new \InvalidArgumentException('SchemaCreateTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.');
} }
$this->_table = $table;
$this->_platform = $platform; $this->_platform = $platform;
} }
......
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