diff --git a/src/Spryker/Zed/EventBehavior/Business/Model/EventResourcePluginResolver.php b/src/Spryker/Zed/EventBehavior/Business/Model/EventResourcePluginResolver.php index 1812bcb8..5ca79199 100644 --- a/src/Spryker/Zed/EventBehavior/Business/Model/EventResourcePluginResolver.php +++ b/src/Spryker/Zed/EventBehavior/Business/Model/EventResourcePluginResolver.php @@ -199,38 +199,20 @@ protected function filterPluginsByResources(array $eventResourcePlugins, array $ protected function extractEffectivePlugins($effectivePlugins, $pluginsPerExporter): array { foreach ($effectivePlugins as $effectiveEventPlugins) { - $effectivePlugin = $this->findEffectivePlugin($effectiveEventPlugins); - - if ($effectivePlugin === null) { - continue; - } - - if ($this->isEventResourceRepositoryPlugin($effectivePlugin)) { - $pluginsPerExporter[static::REPOSITORY_EVENT_RESOURCE_PLUGINS][] = $effectivePlugin; - } - - if ($this->isEventResourceQueryContainerPlugin($effectivePlugin)) { - $pluginsPerExporter[static::QUERY_CONTAINER_EVENT_RESOURCE_PLUGINS][] = $effectivePlugin; + foreach ($effectiveEventPlugins as $effectiveEventPlugin) { + if ($this->isEventResourceRepositoryPlugin($effectiveEventPlugin)) { + $pluginsPerExporter[static::REPOSITORY_EVENT_RESOURCE_PLUGINS][] = $effectiveEventPlugin; + } + + if ($this->isEventResourceQueryContainerPlugin($effectiveEventPlugin)) { + $pluginsPerExporter[static::QUERY_CONTAINER_EVENT_RESOURCE_PLUGINS][] = $effectiveEventPlugin; + } } } return $pluginsPerExporter; } - /** - * @param array<\Spryker\Zed\EventBehavior\Dependency\Plugin\EventResourcePluginInterface> $eventResourcePlugins - * - * @return \Spryker\Zed\EventBehavior\Dependency\Plugin\EventResourcePluginInterface|null - */ - protected function findEffectivePlugin(array $eventResourcePlugins): ?EventResourcePluginInterface - { - if ($eventResourcePlugins === []) { - return null; - } - - return current($eventResourcePlugins); - } - /** * @param \Spryker\Zed\EventBehavior\Dependency\Plugin\EventResourcePluginInterface $eventResourcePlugin *