1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Fabiang\DoctrineDynamic\Service; |
||
6 | |||
7 | use Doctrine\ORM\EntityManager; |
||
8 | use Fabiang\DoctrineDynamic\Configuration; |
||
9 | use Fabiang\DoctrineDynamic\ProxyDriver; |
||
10 | use Fabiang\DoctrineDynamic\ProxyDriverFactory as BaseProxyDriverFactory; |
||
11 | use Laminas\ServiceManager\Factory\FactoryInterface; |
||
12 | use Psr\Container\ContainerInterface; |
||
13 | |||
14 | final class ProxyDriverFactory extends BaseProxyDriverFactory implements |
||
15 | FactoryInterface |
||
16 | { |
||
17 | /** |
||
18 | * @param string $requestedName |
||
19 | * @return ProxyDriver[] |
||
20 | */ |
||
21 | 1 | public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): array |
|
22 | { |
||
23 | 1 | $entityManager = $container->get(EntityManager::class); |
|
24 | 1 | $configuration = $container->get(Configuration::class); |
|
25 | 1 | return $this->factory($entityManager, $configuration); |
|
0 ignored issues
–
show
|
|||
26 | } |
||
27 | } |
||
28 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: