Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function prepareDatabase() |
||
16 | { |
||
17 | // The database needs to be deleted before the application gets boted |
||
18 | // to avoid having the database in a weird read-only state. |
||
19 | |||
20 | if (static::$migrated) { |
||
21 | return; |
||
22 | } |
||
23 | |||
24 | @unlink($this->database); |
||
|
|||
25 | touch($this->database); |
||
26 | } |
||
27 | |||
76 |
If you suppress an error, we recommend checking for the error condition explicitly: