PageFactory   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A newPage() 0 4 1
A newIndexPage() 0 4 1
A newRootPage() 0 4 1
1
<?php
2
namespace Bookdown\Bookdown\Content;
3
4
use Bookdown\Bookdown\Config\IndexConfig;
5
use Bookdown\Bookdown\Config\RootConfig;
6
7
class PageFactory
8
{
9 22
    public function newPage($origin, $name, $parent, $count)
10
    {
11 22
        return new Page($origin, $name, $parent, $count);
12
    }
13
14 22
    public function newIndexPage(IndexConfig $config, $name, $parent, $count)
15
    {
16 22
        return new IndexPage($config, $name, $parent, $count);
17
    }
18
19 22
    public function newRootPage(RootConfig $config)
20
    {
21 22
        return new RootPage($config);
22
    }
23
}
24