Psr4PathGenerator   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 81.82%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 21
ccs 9
cts 11
cp 0.8182
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setTargets() 0 10 3
1
<?php
2
namespace GoetasWebservices\Xsd\XsdToPhp\PathGenerator;
3
4
abstract class Psr4PathGenerator
5
{
6
7
    protected $namespaces = array();
8
9 6
    public function __construct(array $targets = array())
10
    {
11 6
        $this->setTargets($targets);
12 6
    }
13
14 6
    public function setTargets($namespaces)
15
    {
16 6
        $this->namespaces = $namespaces;
17
18 6
        foreach ($this->namespaces as $namespace => $dir) {
19 6
            if (!is_dir($dir)) {
20
                mkdir($dir, 0777, true);
21
            }
22 6
        }
23 6
    }
24
}
25
26