Passed
Pull Request — master (#2)
by Alex
08:14
created

QueryServiceManagerFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arp\LaminasDoctrine\Factory\Repository\Query;
6
7
use Arp\LaminasDoctrine\Repository\Query\QueryServiceManager;
8
use Arp\LaminasFactory\AbstractFactory;
9
use Psr\Container\ContainerInterface;
10
11
/**
12
 * @deprecated
13
 *
14
 * @author  Alex Patterson <[email protected]>
15
 * @package Arp\LaminasDoctrine\Factory\Repository\Query
16
 */
17
final class QueryServiceManagerFactory extends AbstractFactory
18
{
19
    /**
20
     * @param ContainerInterface $container
21
     * @param string             $requestedName
22
     * @param array|null         $options
23
     *
24
     * @return QueryServiceManager
25
     */
26
    public function __invoke(
27
        ContainerInterface $container,
28
        string $requestedName,
29
        array $options = null
30
    ): QueryServiceManager {
31
        $config = $this->getApplicationOptions($container, 'query_service_manager');
32
33
        return new QueryServiceManager($container, $config);
0 ignored issues
show
Deprecated Code introduced by
The class Arp\LaminasDoctrine\Repo...ery\QueryServiceManager has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

33
        return /** @scrutinizer ignore-deprecated */ new QueryServiceManager($container, $config);
Loading history...
34
    }
35
}
36