alex-patterson-webdev /
laminas-entity
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Arp\LaminasEntity; |
||
| 6 | |||
| 7 | use Arp\LaminasEntity\Service\EntityRepositoryManager; |
||
| 8 | use Arp\LaminasEntity\Service\EntityRepositoryManagerProviderInterface; |
||
| 9 | use Laminas\ModuleManager\Listener\ServiceListenerInterface; |
||
| 10 | use Laminas\ModuleManager\ModuleManager; |
||
| 11 | use Laminas\ModuleManager\ModuleManagerInterface; |
||
| 12 | use Psr\Container\ContainerInterface; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @author Alex Patterson <[email protected]> |
||
| 16 | * @package Arp\LaminasEntity |
||
| 17 | */ |
||
| 18 | final class Module |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @param ModuleManagerInterface|ModuleManager $moduleManager |
||
| 22 | */ |
||
| 23 | public function init(ModuleManagerInterface $moduleManager): void |
||
| 24 | { |
||
| 25 | /** @var ContainerInterface $serviceManager */ |
||
| 26 | $serviceManager = $moduleManager->getEvent()->getParam('ServiceManager'); |
||
|
0 ignored issues
–
show
|
|||
| 27 | |||
| 28 | $this->bootstrapEntityRepositoryManager($serviceManager); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Prepare the entity repository manager. |
||
| 33 | * |
||
| 34 | * @param ContainerInterface $container |
||
| 35 | */ |
||
| 36 | private function bootstrapEntityRepositoryManager(ContainerInterface $container): void |
||
| 37 | { |
||
| 38 | /** @var ServiceListenerInterface $serviceListener */ |
||
| 39 | $serviceListener = $container->get('ServiceListener'); |
||
| 40 | |||
| 41 | $serviceListener->addServiceManager( |
||
| 42 | EntityRepositoryManager::class, |
||
| 43 | 'entity_repository_manager', |
||
| 44 | EntityRepositoryManagerProviderInterface::class, |
||
| 45 | 'getEntityRepositoryConfig' |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return array |
||
| 51 | */ |
||
| 52 | public function getConfig(): array |
||
| 53 | { |
||
| 54 | return require __DIR__ . '/../config/module.config.php'; |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.