Test Failed
Push — master ( d3e9ef...1b9271 )
by Johannes
04:34
created

ParseContentCommandFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

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 4
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\Command;
11
12
use Zend\ServiceManager\Factory\FactoryInterface;
13
use Interop\Container\ContainerInterface;
14
use Jolicht\MarkdownCms\Parser\ParseContentExecutor;
15
16
class ParseContentCommandFactory implements FactoryInterface
17
{
18
    /**
19
     * Get parse content command
20
     * @return ParseContentCommand
21
     * {@inheritDoc}
22
     * @see \Zend\ServiceManager\Factory\FactoryInterface::__invoke()
23
     */
24
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null) : ParseContentCommand
25
    {
26
        $command = new ParseContentCommand();
27
        $command->setParseContentExecutor($container->get(ParseContentExecutor::class));
28
        return $command;
29
    }
30
}