GeneratorFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 1
c 2
b 1
f 0
lcom 0
cbo 6
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createDefault() 0 9 1
1
<?php
2
3
namespace Tonic\Component\ApiLayer\JsonRpcExtensions\Documentation;
4
5
use Doctrine\Common\Annotations\PhpParser;
6
use Tonic\Component\Reflection\TypeResolver;
7
8
/**
9
 * Simple factory for documentation generator.
10
 */
11
class GeneratorFactory
12
{
13
    /**
14
     * @return Generator
15
     */
16
    public function createDefault()
17
    {
18
        return new Generator(
19
            new MetadataExtractor(new TypeResolver(new PhpParser())),
20
            new \Twig_Environment(new \Twig_Loader_Filesystem([
21
                __DIR__.'/Resources',
22
            ]))
23
        );
24
    }
25
}
26