ReportingCloudFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * ReportingCloud Zend Framework 3 Module
6
 *
7
 * Zend Framework 3 Module for ReportingCloud Web API. Authored and supported by Text Control GmbH.
8
 *
9
 * @link      https://www.reporting.cloud to learn more about ReportingCloud
10
 * @link      https://git.io/Je5US for the canonical source repository
11
 * @license   https://github.com/TextControl/txtextcontrol-reportingcloud-php-zf-module/blob/master/LICENSE.md
12
 * @copyright © 2020 Text Control GmbH
13
 */
14
15
namespace TxTextControl\ReportingCloud\Mvc\Controller\Plugin;
16
17
use Interop\Container\ContainerInterface;
18
use Zend\ServiceManager\Factory\FactoryInterface;
19
20
/**
21
 * Class ReportingCloudFactory
22
 *
23
 * @package TxTextControl\ReportingCloud
24
 * @author  Jonathan Maron (@JonathanMaron)
25
 */
26
class ReportingCloudFactory implements FactoryInterface
27
{
28
    /**
29
     * @param ContainerInterface $container
30
     * @param string             $requestedName
31
     * @param array|null         $options
32
     *
33
     * @return ReportingCloud
34
     */
35
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null): ReportingCloud
36
    {
37
        $reportingCloud = $container->get('ReportingCloud');
38
39
        return new ReportingCloud($reportingCloud);
40
    }
41
}
42