Conditions | 4 |
Paths | 6 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | protected function deleteAllTempDbs() { |
||
31 | $prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_'; |
||
32 | foreach(DB::get_schema()->databaseList() as $dbName) { |
||
33 | if(preg_match(sprintf('/^%stmpdb[0-9]+$/', $prefix), $dbName)) { |
||
34 | DB::get_schema()->dropDatabase($dbName); |
||
35 | $this->info("Dropped database $dbName"); |
||
36 | } |
||
37 | } |
||
38 | } |
||
39 | } |
||
40 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.