1 | <?php |
||
10 | class MigrationEvent extends Event |
||
11 | { |
||
12 | /** |
||
13 | * @var Migration[] |
||
14 | */ |
||
15 | protected $migrations = []; |
||
16 | |||
17 | /** |
||
18 | * @var Connection |
||
19 | */ |
||
20 | protected $connection; |
||
21 | |||
22 | /** |
||
23 | * @param Connection $connection |
||
24 | */ |
||
25 | public function __construct(Connection $connection) |
||
29 | |||
30 | /** |
||
31 | * Adds a migration |
||
32 | * |
||
33 | * @param Migration $migration |
||
34 | * @param bool $prepend If TRUE a migration is added to the beginning of the list |
||
35 | */ |
||
36 | public function addMigration(Migration $migration, $prepend = false) |
||
44 | |||
45 | /** |
||
46 | * Gets all migrations |
||
47 | * |
||
48 | * @return Migration[] |
||
49 | */ |
||
50 | public function getMigrations() |
||
54 | |||
55 | /** |
||
56 | * Prepares and executes an SQL query and returns the result as an associative array. |
||
57 | * |
||
58 | * @param string $sql The SQL query. |
||
59 | * @param array $params The query parameters. |
||
60 | * @param array $types The query parameter types. |
||
61 | * @return array |
||
62 | */ |
||
63 | public function getData($sql, array $params = array(), $types = array()) |
||
69 | |||
70 | /** |
||
71 | * Check if the given table exists in a database |
||
72 | * |
||
73 | * @param string $tableName |
||
74 | * @return bool TRUE if a table exists; otherwise, FALSE |
||
75 | */ |
||
76 | public function isTableExist($tableName) |
||
89 | } |
||
90 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: