Flat   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A localDatabase() 0 7 1
1
<?php
2
3
namespace Mattbit;
4
5
use League\Flysystem\Plugin\ListPaths;
6
use Mattbit\Flat\Database;
7
use Mattbit\Flat\Storage\JsonEncoder;
8
use Mattbit\Flat\Storage\FilesystemEngine;
9
10
class Flat
11
{
12
    /**
13
     * Select the database.
14
     *
15
     * @param  string $path
16
     *
17
     * @return Database
18
     */
19
    public static function localDatabase($path)
20
    {
21
        $encoder = new JsonEncoder();
22
        $engine = new FilesystemEngine($path, $encoder);
23
24
        return new Database($engine);
25
    }
26
}
27