1 | <?php |
||
31 | class SchemaWrapper implements ISchemaWrapper { |
||
32 | |||
33 | /** @var IDBConnection|Connection */ |
||
34 | protected $connection; |
||
35 | |||
36 | /** @var Schema */ |
||
37 | protected $schema; |
||
38 | |||
39 | /** @var array */ |
||
40 | protected $tablesToDelete = []; |
||
41 | |||
42 | /** |
||
43 | * @param IDBConnection $connection |
||
44 | */ |
||
45 | public function __construct(IDBConnection $connection) { |
||
49 | |||
50 | public function getWrappedSchema() { |
||
53 | |||
54 | public function performDropTableCalls() { |
||
60 | |||
61 | /** |
||
62 | * Gets all table names |
||
63 | * |
||
64 | * @return array |
||
65 | */ |
||
66 | public function getTableNamesWithoutPrefix() { |
||
76 | |||
77 | // Overwritten methods |
||
78 | |||
79 | /** |
||
80 | * @return array |
||
81 | */ |
||
82 | public function getTableNames() { |
||
85 | |||
86 | /** |
||
87 | * @param string $tableName |
||
88 | * |
||
89 | * @return \Doctrine\DBAL\Schema\Table |
||
90 | * @throws \Doctrine\DBAL\Schema\SchemaException |
||
91 | */ |
||
92 | public function getTable($tableName) { |
||
95 | |||
96 | /** |
||
97 | * Does this schema have a table with the given name? |
||
98 | * |
||
99 | * @param string $tableName |
||
100 | * |
||
101 | * @return boolean |
||
102 | */ |
||
103 | public function hasTable($tableName) { |
||
106 | |||
107 | /** |
||
108 | * Creates a new table. |
||
109 | * |
||
110 | * @param string $tableName |
||
111 | * @return \Doctrine\DBAL\Schema\Table |
||
112 | */ |
||
113 | public function createTable($tableName) { |
||
116 | |||
117 | /** |
||
118 | * Drops a table from the schema. |
||
119 | * |
||
120 | * @param string $tableName |
||
121 | * @return \Doctrine\DBAL\Schema\Schema |
||
122 | */ |
||
123 | public function dropTable($tableName) { |
||
127 | |||
128 | /** |
||
129 | * Gets all tables of this schema. |
||
130 | * |
||
131 | * @return \Doctrine\DBAL\Schema\Table[] |
||
132 | */ |
||
133 | public function getTables() { |
||
136 | } |
||
137 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: