1 | <?php |
||
8 | class MigrateManager |
||
9 | { |
||
10 | /** @var \Wandu\Database\Migrator\MigrateAdapterInterface */ |
||
11 | protected $adapter; |
||
12 | |||
13 | /** @var \Wandu\Database\Migrator\Configuration */ |
||
14 | protected $config; |
||
15 | |||
16 | /** @var \Wandu\DI\ContainerInterface */ |
||
17 | protected $container; |
||
18 | |||
19 | /** |
||
20 | * @param \Wandu\Database\Migrator\MigrateAdapterInterface $adapter |
||
21 | * @param \Wandu\Database\Migrator\Configuration $config |
||
22 | * @param \Wandu\DI\ContainerInterface $container |
||
23 | */ |
||
24 | public function __construct(MigrateAdapterInterface $adapter, Configuration $config, ContainerInterface $container) |
||
30 | |||
31 | /** |
||
32 | * @return array|\Wandu\Database\Migrator\MigrationContainer[] |
||
33 | */ |
||
34 | public function getMigrations() |
||
42 | |||
43 | /** |
||
44 | * @param string $migrationId |
||
45 | * @return \Wandu\Database\Migrator\MigrationContainer |
||
46 | */ |
||
47 | public function getMigration($migrationId) |
||
56 | |||
57 | /** |
||
58 | * @param string $migrationId |
||
59 | */ |
||
60 | public function up($migrationId) |
||
72 | |||
73 | /** |
||
74 | * @param string $migrationId |
||
75 | */ |
||
76 | public function down($migrationId) |
||
90 | |||
91 | /** |
||
92 | * @return array|\Wandu\Database\Migrator\MigrationContainer[] |
||
93 | */ |
||
94 | public function migrate() |
||
106 | |||
107 | /** |
||
108 | * @return array |
||
109 | */ |
||
110 | protected function getAllMigrationFiles() |
||
120 | |||
121 | /** |
||
122 | * @param string $source |
||
123 | * @return string |
||
124 | */ |
||
125 | protected function getMigrationClassFromSource($source) |
||
137 | } |
||
138 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.