src/EventStoreIntegration/ClosureAggregateTranslator.php
public function extractAggregateVersion($eventSourcedAggregateRoot): int
    {
        if (null === $this->versionExtractor) {
            $this->versionExtractor = function (): int {
                return $this->version;
            };
        }

        return $this->versionExtractor->call($eventSourcedAggregateRoot);
    }
public function extractAggregateVersion($eventSourcedAggregateRoot): int
    {
        if (null === $this->versionExtractor) {
            $this->versionExtractor = function (): int {
                return $this->version;
            };
        }

        return $this->versionExtractor->call($eventSourcedAggregateRoot);
    }
@param object $eventSourcedAggregateRoot

@return int