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

SaveContentConfigObserverFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 8 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\Parser\Observer;
11
12
use Zend\ServiceManager\Factory\FactoryInterface;
13
use Interop\Container\ContainerInterface;
14
use Zend\Config\Writer\PhpArray;
15
16
class SaveContentConfigObserverFactory implements FactoryInterface
17
{
18
    /**
19
     * Get save content config observer
20
     * @return SaveContentConfigObserver
21
     * {@inheritDoc}
22
     * @see \Zend\ServiceManager\Factory\FactoryInterface::__invoke()
23
     */
24
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null) : SaveContentConfigObserver
25
    {
26
        $config = $container->get('config');
27
        return new SaveContentConfigObserver(
28
            new PhpArray(),
29
            $config['markdown_cms']['options']['content_config_path']
30
        );
31
    }
32
}