Sqlite   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A dropAllTables() 0 14 3
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 ($dbPath === ':memory:') {
14
            return;
15
        }
16
17
        if (file_exists($dbPath)) {
18
            unlink($dbPath);
19
        }
20
21
        touch($dbPath);
22
    }
23
}
24