diff --git a/phpstan.neon b/phpstan.neon index da39d73..d5b72bb 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,4 +7,9 @@ parameters: symfony: container_xml_path: %currentWorkingDirectory%/var/cache/test/TestKernelTestDebugContainer.xml constant_hassers: false - ignoreErrors: \ No newline at end of file + excludePaths: + analyse: + - %currentWorkingDirectory%/src/Queue/Transport/ExtendedDoctrineConnection.php + ignoreErrors: + - + message: "#^Method DynamicSearchBundle\\\\Queue\\\\MessageHandler\\\\(.*)Handler\\:\\:(getBatchSize|process)\\(\\) is unused\\.$#" diff --git a/src/Queue/MessageHandler/ProcessResourceHandler.php b/src/Queue/MessageHandler/ProcessResourceHandler.php index af697e1..20048e7 100644 --- a/src/Queue/MessageHandler/ProcessResourceHandler.php +++ b/src/Queue/MessageHandler/ProcessResourceHandler.php @@ -46,18 +46,9 @@ private function process(array $jobs): void } foreach ($groupedResourceMetas as $contextName => $contextResourceMetas) { - if (!is_array($contextResourceMetas) || count($contextResourceMetas) === 0) { - continue; - } - foreach ($contextResourceMetas as $dispatchType => $resourceMetas) { - if (!is_array($resourceMetas) || count($resourceMetas) === 0) { - continue; - } try { - $this->resourceRunner->runResourceStack($contextName, $dispatchType, $resourceMetas); - } catch (SilentException $e) { // do not raise errors in silent exception. this error has been logged already in the right channel. } catch (\Throwable $e) { diff --git a/src/Queue/Transport/ExtendedDoctrineConnection.php b/src/Queue/Transport/ExtendedDoctrineConnection.php index d7e4587..c77bb99 100644 --- a/src/Queue/Transport/ExtendedDoctrineConnection.php +++ b/src/Queue/Transport/ExtendedDoctrineConnection.php @@ -2,8 +2,10 @@ namespace DynamicSearchBundle\Queue\Transport; +use Doctrine\DBAL\Abstraction\Result as AbstractionResult; use Doctrine\DBAL\Connection as DBALConnection; use Doctrine\DBAL\Driver\Exception as DriverException; +use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Exception\TableNotFoundException; use Doctrine\DBAL\LockMode;