DependencyGuardFactory::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 8
ccs 7
cts 7
cp 1
crap 1
rs 10
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