Passed
Pull Request — master (#600)
by Mathias
13:24
created

FeaturedCompaniesControllerFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
c 1
b 0
f 1
dl 0
loc 7
rs 10
cc 1
nc 1
nop 3
1
<?php
2
3
/**
4
 * YAWIK
5
 *
6
 * @see       https://github.com/cross-solution/YAWIK for the canonical source repository
7
 * @copyright https://github.com/cross-solution/YAWIK/blob/master/COPYRIGHT
8
 * @license   https://github.com/cross-solution/YAWIK/blob/master/LICENSE
9
 */
10
11
declare(strict_types=1);
12
13
namespace Organizations\Controller;
14
15
use Psr\Container\ContainerInterface;
16
17
/**
18
 * Factory for \Organizations\Controller\FeaturedCompaniesController
19
 *
20
 * @author Mathias Gelhausen
21
 * TODO: write tests
22
 */
23
class FeaturedCompaniesControllerFactory
24
{
25
    public function __invoke(
26
        ContainerInterface $container,
27
        string $requestedName,
28
        ?array $options = null
29
    ): FeaturedCompaniesController {
30
        return new FeaturedCompaniesController(
31
            $container->get('repositories')->get('Organizations')
32
        );
33
    }
34
}
35