diff --git a/baseline.xml b/baseline.xml
index 2a1ccf71c..e107ec3e1 100644
--- a/baseline.xml
+++ b/baseline.xml
@@ -56,12 +56,16 @@
errorContext]]>
-
+
+
+ projector->$method(...)]]>
+
+
diff --git a/src/Projection/Projectionist/DefaultProjectionist.php b/src/Projection/Projectionist/DefaultProjectionist.php
index 6c6652f3d..0f3e905c5 100644
--- a/src/Projection/Projectionist/DefaultProjectionist.php
+++ b/src/Projection/Projectionist/DefaultProjectionist.php
@@ -792,7 +792,6 @@ private function discoverNewProjections(): void
new ProjectionCriteria(),
function (array $projections): void {
foreach ($this->projectorRepository->all() as $projector) {
-
foreach ($projections as $projection) {
if ($projection->id() === $projector->id()) {
continue 2;
@@ -804,7 +803,7 @@ function (array $projections): void {
$projector->id(),
$projector->group(),
$projector->runMode(),
- )
+ ),
);
$this->logger?->info(
diff --git a/src/Projection/Projector/MetadataProjectorAccessor.php b/src/Projection/Projector/MetadataProjectorAccessor.php
index a9bb0ac43..543c406fb 100644
--- a/src/Projection/Projector/MetadataProjectorAccessor.php
+++ b/src/Projection/Projector/MetadataProjectorAccessor.php
@@ -1,17 +1,22 @@
>
- */
+ /** @var array> */
private array $subscribeCache = [];
public function __construct(
@@ -60,9 +65,9 @@ public function teardownMethod(): Closure|null
/**
* @param class-string $eventClass
*
- * @return iterable
+ * @return list
*/
- public function subscribeMethods(string $eventClass): iterable
+ public function subscribeMethods(string $eventClass): array
{
if (array_key_exists($eventClass, $this->subscribeCache)) {
return $this->subscribeCache[$eventClass];
@@ -74,10 +79,11 @@ public function subscribeMethods(string $eventClass): iterable
);
$this->subscribeCache[$eventClass] = array_map(
- fn(string $method) => $this->projector->$method(...),
+ /** @return Closure(Message):void */
+ fn (string $method) => $this->projector->$method(...),
$methods,
);
return $this->subscribeCache[$eventClass];
}
-}
\ No newline at end of file
+}
diff --git a/src/Projection/Projector/MetadataProjectorAccessorRepository.php b/src/Projection/Projector/MetadataProjectorAccessorRepository.php
index 0734ec67d..81c4714a0 100644
--- a/src/Projection/Projector/MetadataProjectorAccessorRepository.php
+++ b/src/Projection/Projector/MetadataProjectorAccessorRepository.php
@@ -1,53 +1,51 @@
- */
+ /** @var array */
private array $projectorsMap = [];
+ /** @param iterable