WebdavAdapterFactory::createAdapter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Lamoda\Codeception\Extension\AdapterFactory;
4
5
use League\Flysystem\AdapterInterface;
6
use League\Flysystem\WebDAV\WebDAVAdapter;
7
use Sabre\DAV\Client;
8
9
class WebdavAdapterFactory implements AdapterFactoryInterface
10
{
11
    /**
12
     * @param array $config
13
     *
14
     * @return AdapterInterface
15
     */
16 2
    public static function createAdapter(array $config)
17
    {
18 2
        $client = new Client($config);
19
20 2
        return new WebDAVAdapter($client);
21
    }
22
}
23