Completed
Push — master ( 4534a2...4c3ec3 )
by Johannes
03:54
created

MarkdownDocumentParserFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
/**
3
 * Lichtenwallner  (https://lichtenwallner.at)
4
 *
5
 * @see https://github.com/jolicht/markdown-cms for the canonical source repository
6
 * @license https://github.com/jolicht/markdown-cms/blob/master/LICENSE MIT
7
 * @copyright Copyright (c) Johannes Lichtenwallner
8
 */
9
declare(strict_types = 1);
10
namespace Jolicht\MarkdownCms\Markdown;
11
12
use Zend\ServiceManager\Factory\FactoryInterface;
13
use Interop\Container\ContainerInterface;
14
use Mni\FrontYAML\Parser;
15
16
/**
17
 * Factory to create MarkdownDocumentParser
18
 */
19
class MarkdownDocumentParserFactory implements FactoryInterface
20
{
21
    /**
22
     * Get markdown document parser
23
     *
24
     * @return MarkdownDocumentParser
25
     * {@inheritDoc}
26
     * @see \Zend\ServiceManager\Factory\FactoryInterface::__invoke()
27
     */
28
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null) : MarkdownDocumentParser
29
    {
30
        return new MarkdownDocumentParser(
31
            $container->get(Parser::class)
32
        );
33
    }
34
}