FileLocator   A
last analyzed

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
/**
12
 * @internal
13
 */
14
final class FileLocator extends BaseFileLocator
15
{
16 1832
    public function __construct(string $proxiesDirectory)
17
    {
18 1832
        $absolutePath = realpath($proxiesDirectory);
19
20 1832
        if ($absolutePath === false) {
21
            mkdir($proxiesDirectory, 0775, true);
22
        }
23
24 1832
        parent::__construct($proxiesDirectory);
25 1832
    }
26
}
27