HeadingsProcessBuilder   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 2
c 3
b 0
f 0
lcom 0
cbo 2
dl 0
loc 16
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A newInstance() 0 8 1
A newHeadingFactory() 0 4 1
1
<?php
2
namespace Bookdown\Bookdown\Process\Headings;
3
4
use Psr\Log\LoggerInterface;
5
use Bookdown\Bookdown\Config\RootConfig;
6
use Bookdown\Bookdown\Content\HeadingFactory;
7
use Bookdown\Bookdown\Fsio;
8
use Bookdown\Bookdown\Process\ProcessBuilderInterface;
9
10
class HeadingsProcessBuilder implements ProcessBuilderInterface
11
{
12 14
    public function newInstance(RootConfig $config, LoggerInterface $logger, Fsio $fsio)
13
    {
14 14
        return new HeadingsProcess(
15 14
            $logger,
16 14
            $fsio,
17 14
            $this->newHeadingFactory()
18 14
        );
19
    }
20
21 14
    protected function newHeadingFactory()
22
    {
23 14
        return new HeadingFactory();
24
    }
25
}
26