HeadingsProcessBuilder::newInstance()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

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