Issues (31)

src/Controller/CheckInControllerFactory.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace ConferenceTools\Checkin\Controller;
4
5
use Carnage\Cqorms\Persistence\ReadModel\DoctrineRepository;
6
use Carnage\Cqrs\Command\CommandBusInterface;
7
use ConferenceTools\Checkin\Domain\ReadModel\Delegate;
8
use Doctrine\ORM\EntityManager;
9
use Interop\Container\ContainerInterface;
10
use Zend\ServiceManager\FactoryInterface;
11
use Zend\ServiceManager\ServiceLocatorInterface;
12
13
class CheckInControllerFactory implements FactoryInterface
14
{
15
    public function createService(ServiceLocatorInterface $serviceLocator, $cName = null, $rName = null)
16
    {
17
        return $this($serviceLocator->getServiceLocator(), $rName);
0 ignored issues
show
The method getServiceLocator() does not exist on Zend\ServiceManager\ServiceLocatorInterface. It seems like you code against a sub-type of Zend\ServiceManager\ServiceLocatorInterface such as Zend\ServiceManager\AbstractPluginManager. ( Ignorable by Annotation )

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

17
        return $this($serviceLocator->/** @scrutinizer ignore-call */ getServiceLocator(), $rName);
Loading history...
18
    }
19
20
    public function __invoke(ContainerInterface $container, $name, $options = [])
21
    {
22
        return new CheckInController(
23
            $container->get(CommandBusInterface::class),
24
            new DoctrineRepository(Delegate::class, $container->get(EntityManager::class))
25
        );
26
    }
27
}