Passed
Branch master (267be1)
by Eugene
03:26
created

FilesystemFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 12
ccs 0
cts 5
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __invoke() 0 4 1
1
<?php
2
namespace Staticus\FileSystem;
3
use League\Flysystem\AdapterInterface;
4
use League\Flysystem\Filesystem;
5
6
class FilesystemFactory
7
{
8
    protected $adapter;
9
    public function __construct(AdapterInterface $adapter)
10
    {
11
        $this->adapter = $adapter;
12
    }
13
    public function __invoke()
14
    {
15
        return new Filesystem($this->adapter);
16
    }
17
}