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

ParseContentCommandFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 15
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\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
}