HeadingsProcessBuilder::newHeadingFactory()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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