ParserBuilderFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 7

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 19 1
1
<?php
2
/**
3
 * @author stev leibelt <[email protected]>
4
 * @since 2017-04-11
5
 */
6
7
namespace Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder;
8
9
use JonasRudolph\PHPComponents\StringUtility\Implementation\StringUtility;
10
use Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\DetailLineParser;
11
use Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\DetailListOfLineParser;
12
use Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\InformationListOfLineParser;
13
use Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\ScoreboardListOfLineParser;
14
use Net\Bazzline\Component\ApacheServerStatusParser\Service\Content\Parser\StatisticListOfLineParser;
15
16
class ParserBuilderFactory
17
{
18
    /**
19
     * @return ParserBuilder
20
     */
21
    public function create()
22
    {
23
        $stringUtility = new StringUtility();
24
25
        return new ParserBuilder(
26
            new DetailListOfLineParser(
27
                new DetailLineParser(
28
                    $stringUtility
29
                )
30
            ),
31
            new InformationListOfLineParser(
32
                $stringUtility
33
            ),
34
            new ScoreboardListOfLineParser(),
35
            new StatisticListOfLineParser(
36
                $stringUtility
37
            )
38
        );
39
    }
40
}
41