DependencyGuardFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 15
ccs 7
cts 7
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 8 1
1
<?php
2
/**
3
 * Copyright MediaCT. All rights reserved.
4
 * https://www.mediact.nl
5
 */
6
7
namespace Mediact\DependencyGuard;
8
9
use Mediact\DependencyGuard\Composer\Iterator\SourceFileIteratorFactory;
10
use Mediact\DependencyGuard\Php\Filter\SymbolFilterFactory;
11
use Mediact\DependencyGuard\Php\SymbolExtractor;
12
use Mediact\DependencyGuard\Violation\Filter\ViolationFilterFactory;
13
use Mediact\DependencyGuard\Violation\Finder\ViolationFinder;
14
15
class DependencyGuardFactory implements DependencyGuardFactoryInterface
16
{
17
    /**
18
     * Create a new dependency guard.
19
     *
20
     * @return DependencyGuardInterface
21
     */
22 1
    public function create(): DependencyGuardInterface
23
    {
24 1
        return new DependencyGuard(
25 1
            new SourceFileIteratorFactory(),
26 1
            new SymbolExtractor(),
27 1
            new SymbolFilterFactory(),
28 1
            new ViolationFinder(),
29 1
            new ViolationFilterFactory()
30
        );
31
    }
32
}
33