Completed
Push — master ( a6f482...e74e5e )
by Maciej
12s
created

FileLocator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 13
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ODM\MongoDB\Proxy;
6
7
use ProxyManager\FileLocator\FileLocator as BaseFileLocator;
8
use function mkdir;
9
use function realpath;
10
11
final class FileLocator extends BaseFileLocator
12
{
13 1697
    public function __construct(string $proxiesDirectory)
14
    {
15 1697
        $absolutePath = realpath($proxiesDirectory);
16
17 1697
        if ($absolutePath === false) {
18
            mkdir($proxiesDirectory, 0755, true);
19
        }
20
21 1697
        parent::__construct($proxiesDirectory);
22 1697
    }
23
}
24