Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
benwalch committed Apr 3, 2024
1 parent 26ea90e commit 56bbcf6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
7 changes: 6 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ parameters:
symfony:
container_xml_path: %currentWorkingDirectory%/var/cache/test/TestKernelTestDebugContainer.xml
constant_hassers: false
ignoreErrors:
excludePaths:
analyse:
- %currentWorkingDirectory%/src/Queue/Transport/ExtendedDoctrineConnection.php
ignoreErrors:
-
message: "#^Method DynamicSearchBundle\\\\Queue\\\\MessageHandler\\\\(.*)Handler\\:\\:(getBatchSize|process)\\(\\) is unused\\.$#"
9 changes: 0 additions & 9 deletions src/Queue/MessageHandler/ProcessResourceHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions src/Queue/Transport/ExtendedDoctrineConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 56bbcf6

Please sign in to comment.