Skip to content

Commit

Permalink
fix interface check
Browse files Browse the repository at this point in the history
  • Loading branch information
xepozz committed Dec 21, 2024
1 parent 2fa101e commit 73bee31
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/RoadRunnerHttpApplicationRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Http\Message\ResponseInterface;
use ReflectionClass;
use RuntimeException;
use Spiral\RoadRunner\Environment;
use Spiral\RoadRunner\Environment\Mode;
Expand All @@ -31,6 +32,7 @@
use Yiisoft\Yii\Runner\RoadRunner\Temporal\TemporalDeclarationProvider;

use function gc_collect_cycles;
use function interface_exists;

/**
* `RoadRunnerHttpApplicationRunner` runs the Yii HTTP application using RoadRunner.
Expand Down Expand Up @@ -265,7 +267,7 @@ private function runTemporal(ContainerInterface $container): void
$worker->registerWorkflowTypes(...$workflows);

/** @psalm-suppress MixedReturnStatement,MixedInferredReturnType */
$activityFactory = static fn (\ReflectionClass $class): object => $container->get($class->getName());
$activityFactory = static fn (ReflectionClass $class): object => $container->get($class->getName());
$activityFinalizer = static function () use ($container): void {
/** @psalm-suppress MixedMethodCall */
$container
Expand All @@ -284,6 +286,6 @@ private function runTemporal(ContainerInterface $container): void

private function isTemporalSDKInstalled(): bool
{
return class_exists(WorkerFactoryInterface::class);
return interface_exists(WorkerFactoryInterface::class);
}
}

0 comments on commit 73bee31

Please sign in to comment.