Completed
Push — master ( b2fd5a...6e38be )
by Freek
21:32 queued 12:34
created

Sqlite::dropAllTables()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 0
1
<?php
2
3
namespace Spatie\MigrateFresh\TableDroppers;
4
5
use Illuminate\Support\Facades\DB;
6
7
class Sqlite implements TableDropper
8
{
9
    public function dropAllTables()
10
    {
11
        $dbPath = DB::getConfig('database');
12
13
        if (file_exists($dbPath)) {
14
            unlink($dbPath);
15
        }
16
17
        touch($dbPath);
18
    }
19
}
20