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

MarkdownDocumentParserFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 3
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
}