Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class SqlMigrationRunner extends AbstractMigrationRunner |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Returns supported file extension. |
||
19 | * |
||
20 | * @return string |
||
21 | */ |
||
22 | 1 | public function getFileExtension() |
|
25 | } |
||
26 | |||
27 | /** |
||
28 | * Runs the migration. |
||
29 | * |
||
30 | * @param string $migration_file Migration file. |
||
31 | * @param MigrationContext $context Migration context. |
||
32 | * |
||
33 | * @return void |
||
34 | * @throws \LogicException When an empty migration is discovered. |
||
35 | */ |
||
36 | 2 | public function run($migration_file, MigrationContext $context) |
|
53 |
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.